forked from OpenNeo/impress
Emi Matchu
95c1a4f391
Ahh okay tricky lil thing: if you show the settings page with a partial change to `AuthUser` that didn't get saved, it can throw off the state of some stuff. For example, if you don't have a password yet, then enter a new password but leave the confirmation box blank, then you'll correctly see "Password confirmation can't be blank", but you'll *also* then be prompted for your "Current password", even though you don't have one yet, because `@auth_user.uses_password?` is true now. In this change, we extend the Settings form to use two copies of the `AuthUser`. One is the copy with changes on it, and the other is the "persisted" copy, which we check for parts of the UI that care about what's actually saved, vs form state. |
||
---|---|---|
.. | ||
devise | ||
fundraising | ||
about_controller.rb | ||
alt_styles_controller.rb | ||
application_controller.rb | ||
auth_users_controller.rb | ||
closet_hangers_controller.rb | ||
closet_lists_controller.rb | ||
contributions_controller.rb | ||
item_appearances_controller.rb | ||
item_trades_controller.rb | ||
items_controller.rb | ||
locales_controller.rb | ||
neopass_connections_controller.rb | ||
neopets_connections_controller.rb | ||
neopets_page_import_tasks_controller.rb | ||
outfits_controller.rb | ||
pet_types_controller.rb | ||
pets_controller.rb | ||
sitemap_controller.rb | ||
users_controller.rb |