The server file accepts, parses, and controls the sending of the response. It will contain get or post etc. verb blocks based on the client's chosen path and then contain instructions for the rest of the web application to follow in collecting information from a database and then rendering that information in the context of the user's request.
- Make the variable a local variable, var. Then pass the variable as an argument into the view as a hash.
- Make the variable an instance variable that is then available within the view - because of scope? or because of tricky self things?
- Make the variable a class variable so it is avaialble globally but actually don't do this.
The view has access to any variables that are in the scope of the method from the server. Ruby is available in the view by either <% #ruby_code %> to keep the ruby in the background or <%= ruby_variable %> to have the ruby be visible.
Data comes in from the view as html. Data comes in from the form as a hash stored in params. The values entered in the form are available by calling params[:form_field_name].
Params is a hash of values that is availble in any server block which responsds to a request by the client in which the client enters data.
"Make the variable a class variable so it is avaialble globally but actually don't do this." haha yes. Looks good. it's important to note that the params hash may container data not from the form, but yes all data from the form will come through in the params hash