Does this work? (I prefer form_for over form_tag...)
form_for(:user, :url => password_path(@user), :html => {:method => :put, :onsubmit => 'return false;'}) do |f| ... end
Does this work? (I prefer form_for over form_tag...)
form_for(:user, :url => password_path(@user), :html => {:method => :put, :onsubmit => 'return false;'}) do |f| ... end
Jeremy Weiskotten wrote:
Does this work? (I prefer form_for over form_tag...)
form_for(:user, :url => password_path(@user), :html => {:method => :put, :onsubmit => 'return false;'}) do |f| ... end
Jeremy,
Curious about your preference, because I was trying to use form_for (it's designed for forms related to models) but kept running into trouble using a collection_select to get a pop-up supplying values from a has_one table. Suppose in your example of "user" you wanted to select role from an ancillary table of roles {"novice", "admin", "super admin"}
Would you use f.collection_select? I've been trying to get that to work, and always have to drop back to form_tag and specify my model and collection implicitly.
Cheers,
Jim