Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks for that article. You kinda have where I am going, I guess I am confused with what goes where and why. But more importantly, I am trying to figure out how the respective HTML elements interact with the Model & Controller. E.g. how does a form interact with the controller, and the model, etc. For instance, in my example - calculating the account balance in the model makes sense. But then how do I get it from the model to the view? Specifically. In the model do I initialize an instance variable and then I call that variable from the view or do I call it from the controller.
      singulars
    2. COThen once it is in the controller, how do I get to it from the view to display it? If someone could just do that simple example of the bank transaction for me...then that would help me BIG time. Because I can ask specific questions about why certain things were done. I am not being lazy, I am truly trying to learn how this stuff works. I am working on a web app, and feel stuck at a particular mountain. It is difficult for me to ask for help, because it has become complicated. My problems are gaps in the fundamental understand of how it works. So I am trying to abstract that and figure it out.
      singulars
    3. COOnce you calculate it in the model, you just display the method in the view. eg. <%= account.balance %> The account variable itself is populated depending on the action (eg. index) in the controller (eg. @accounts = Account.find_all) If you go through the example code in that link, it should become clear. Just replace people with accounts and age with account balance. :)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload