I have a regular signup form with virtual_attributes:
attr_accessor :password_confirmation
def password
@password
end
def password=(password)
@password=self.crypted_password = User.encrypt(@password=pass, create_new_password_salt)
end
I would like to clear the password fields of the form when there are errors on password. I figured out how to make the password field not show on error using return, but I can't figure out how to make the password_confirmation field return if there are errors on the password field.
the views are just simple
<% form_for @user do |f| %>
<%= f.password_field :password %>
<%= f.password_field :password_confirmation %>
<% end %>