forked from OpenNeo/impress
Emi Matchu
7f4c34ff6a
Ah right, I went and checked the Devise source code, and the default implementation for `password_required?` is a bit trickier than I expected: ```ruby def password_required? !persisted? || !password.nil? || !password_confirmation.nil? end ``` Looks like `super` does a good enough job here, though! (I'm actually kinda surprised, I wasn't sure how Ruby's `super` rules worked, and this isn't a subclass thing—or maybe it is, maybe the `devise` method adds a mixin? Idk! But it does what I expect, so, great!) So now, we require the password if 1) Devise doesn't see a UI reason not to, *and* 2) the user isn't using OmniAuth (i.e. NeoPass). This had caused a bug where it was impossible to use the Settings page *without* changing your password! (The form says it's okay to leave it blank, which stopped being true! But now it's fixed!) |
||
---|---|---|
.. | ||
fundraising | ||
item | ||
alt_style.rb | ||
application_record.rb | ||
auth_record.rb | ||
auth_user.rb | ||
closet_hanger.rb | ||
closet_list.rb | ||
closet_visibility.rb | ||
color.rb | ||
contribution.rb | ||
item.rb | ||
item_outfit_relationship.rb | ||
neopets_connection.rb | ||
neopets_page.rb | ||
outfit.rb | ||
parent_swf_asset_relationship.rb | ||
pet.rb | ||
pet_state.rb | ||
pet_type.rb | ||
species.rb | ||
swf_asset.rb | ||
user.rb | ||
zone.rb |