Hello,
I have a form that should be a POST method, but Rails insist to put a
hidden field “_method” that has the value “put” does anyone knows why?
Thanks,
David S.
Controller: -------------------------------
def new
@user = @current_user
end
View: -------------------------------------
<% semantic_form_for @user, :url => profile_reset_password_url do |form|
-%>
<% form.inputs -%>
<%= form.input :password -%>
<%= form.input :new_password -%>
<%= form.input :new_password_confirmation -%>
<% end -%>
<%= form.buttons %>
<% end -%>
Routes: -----------------------------------
map.namespace :profile do |profile|
profile.resource :reset_password, :only => [:new, :create]
end
Output: -----------------------------------
Informações- Password* New password* New password confirmation*