ruby on rails - Form_for hepler:reduce default html class -
i have little form_for @user, password reset, , don't want other @user edit forms. tried didn't assign form other default html class of form_for, "edit_user".
tried:
<%= form_for @user, :url=>update_pass_path(:class=>'reset_pass'), :method=>'put' |f| %>
and:
<%= form_for @user, :url=>update_pass_path, :class=>'reset_pass', :method=>'put' |f| %>
still edit_user. solutions?
you can pass html options part of options
hash
like this:
form_for(@user, :url=>update_pass_path, :html => { :class => "reset_pass", :method=>'put' }) |f| ..... end
see documentation: form - api docs
Comments
Post a Comment