Class: User::UpdateDetails::PasswordDetails
- Inherits:
-
Struct
- Object
- Struct
- User::UpdateDetails::PasswordDetails
- Defined in:
- app/models/user/update_details.rb
Overview
Setting the plural route key won’t work, polymorphic_url will still generate a path key with the singular name, so the inflector was updated in this case. model_name.instance_variable_set(:@singular_route_key, ‘update_details’)
Instance Attribute Summary collapse
-
#current_password ⇒ Object
Returns the value of attribute current_password.
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
Instance Attribute Details
#current_password ⇒ Object
Returns the value of attribute current_password
10 11 12 |
# File 'app/models/user/update_details.rb', line 10 def current_password @current_password end |
#password ⇒ Object
Returns the value of attribute password
10 11 12 |
# File 'app/models/user/update_details.rb', line 10 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation
10 11 12 |
# File 'app/models/user/update_details.rb', line 10 def password_confirmation @password_confirmation end |
Instance Method Details
#changed? ⇒ Boolean
11 12 13 14 |
# File 'app/models/user/update_details.rb', line 11 def changed? has_passwords = password || password_confirmation has_passwords && (!password.empty? || !password_confirmation.empty?) end |