Exception: Shoulda::Matchers::ActiveModel::CouldNotSetPasswordError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Shoulda::Matchers::ActiveModel::CouldNotSetPasswordError
- Defined in:
- lib/shoulda/matchers/active_model/errors.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Error
Constructor Details
This class inherits a constructor from Shoulda::Matchers::Error
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
30 31 32 |
# File 'lib/shoulda/matchers/active_model/errors.rb', line 30 def model @model end |
Class Method Details
.create(model) ⇒ Object
26 27 28 |
# File 'lib/shoulda/matchers/active_model/errors.rb', line 26 def self.create(model) super(model:) end |
Instance Method Details
#message ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/shoulda/matchers/active_model/errors.rb', line 32 def "The validation failed because your \#{model_name} model declares `has_secure_password`, and\n`validate_presence_of` was called on a \#{record_name} which has `password` already set to a value.\nPlease use a \#{record_name} with an empty `password` instead.\n EOT\nend\n".strip |