New to rails. I am using form_for helper in rails 2.3.5. The question is, when editing a record, I cannot use:
<% form_for :myrecord, :url => {:action => :update} %>
...
<% end %>
But I have to use:
<% form_for @myrecord, :url => {:action => :update} %>
... # the same as above
<% end %>
When I use the first code, it always return error saying undefined method. Shouldn't the first code and the second code serves the same when "myrecord" is the name of the instance passed from controller to view?
Thank you for any hints and answers.