I apologize for the embarrassingly simplistic nature of this question,
but I'm new to Ruby/Rails.
From within a html.erb file, what is the syntax for assigning a value
to a parameter? For example, when a specific form is used, the
following attribute (make_this_true) should always be 1
<% form_for(@foo) do |f| %>
<%= f.error_messages %>
<%= f.label :make_this_true %><br />
<% foo.make_this_true = 1 %>
but I don't have to tell the readers of this group that the above code
1. is there an easy way to set this attribute? If so, what is the
2. My first attempt at solving this problem involved using a check box
or a radio button that defaulted to "true" but this turned out to be
non-intuitive as well. I then realized that the user should not need
to interact with this variable here.
3. Perhaps making the default value of this variable true in the
database schema? Any tips on that route?
Sorry for the long-windedness and simplistic nature of this question.