I am new to RoR and practice some ruby/rails language feathers on my
toy application. Here is a question about form_for tag in rails.
== the story
People profile can be modified by end user, so there is method called
"update_profile" in the controller.
== the view
<% form_for :person,@person, :url => ....do |f|%>
<%f.hidden_field :id %>
== the controller
person = Person.new(params[:person])
person.new_record = false;
When I print person.id out, the value is nil. However, i can set the
id using below code
person.id = params[:ppl_id]
Can someone explain why so weird? Thanks