My template looks like this:
.dropdown.light .login =form_for("user", :url => user_session_path) do |f| = f.hidden_field :redirect_to, :value => request.fullpath = f.email_field :email, :placeholder => "email", :size => '' = f.password_field :password, :placeholder => "password", :size => '' div.remember = f.check_box :remember_me, :checked => "checked" = f.label :remember_me .clearfix a.forgot.pull-left href="#forgot" Forgot your password? input.pull-right type="submit" value="Sign in" .forgotten =form_for(:user,:as => :user_forgot, :url => password_path(:user), :html => { :method => :post }) do |f| p strong Reset your password p.small Give us your e-mail and you'll be back in a jiffy div= f.email_field :email .clearfix a.forgot.nevermind.pull-left href="#forgot" Nevermind input.pull-right type="submit" value="Reset password" .sent p strong Email sent! p In a couple of minutes you should receive an email with a link to reset your password
It really works, but it generates two forms with duplicate identifiers, such as ...
<input id="user_email" name="user[email]" size="30" type="email">
How can I change this so that identifiers are not duplicated?
source share