views:

31

answers:

2
<% form_for :user, @user, :url => users_path(:from => 'landing'), :id => 'sign_up_form', :html => {:method => :create} do |f| -%>

Can someone tell me why the ID isn't working?

+4  A: 

It should be inside the :html options, not on the same level as :url.

tadman
Thanks! I figured it was something like that I was totally missing (I'm very new to this if you couldn't tell.)
adamwstl
This is one of the inconsistencies between form_tag and form_for that Rails 3 is supposed to be addressing. Right now it's a little odd that the options to two very similar things are completely different and easily confused.
tadman
+1  A: 

Take a look at the documentation and move the :id into the :html hash. http://apidock.com/rails/ActionView/Helpers/FormHelper/form_for

Karl
Thanks Karl. This site looks very helpful.
adamwstl