I have a simple model called Discussion, which has a logical column called allowed.
In my form, I have the following code
<%= form_for(@discussion) do |d| %> ... <%= d.check_box :resolved %> <% end %>
And in my controller, I have the following:
def update @discussion = Discussion.find(params[:id]) if @discussion.update_attributes(params[:discussion]) etc... end end
When I submit the form, I see that the parameters are being sent to the server ...
Parameters: {"utf8"=>"✓", "authenticity_token"=>"AsGsRHwiVva/+kTrBs0IjLeZwj1ZmXBuKZr9Pg/N6Xk=", "discussion"=>{"shortdesc"=>"Talk about something.", "content"=>"Try to update check box.", "resolved"=>"1"}, "commit"=>"Update Discussion", "id"=>"1"}
But the request says nothing about updating this field.
AREL (14.9ms) UPDATE "discussions" SET "content" = 'Try to update check box.', "updated_at" = '2011-07-18 17:53:50.783176' WHERE "discussions"."id" = 1
Any idea on what I am missing?
source share