class Shoulda::Matchers::ActiveModel::CouldNotSetPasswordError
@private
Attributes
Public Class Methods
Source
# File lib/shoulda/matchers/active_model/errors.rb, line 26 def self.create(model) super(model: model) end
Calls superclass method
Shoulda::Matchers::Error::create
Public Instance Methods
Source
# File lib/shoulda/matchers/active_model/errors.rb, line 32 def message <<-EOT.strip The validation failed because your #{model_name} model declares `has_secure_password`, and `validate_presence_of` was called on a #{record_name} which has `password` already set to a value. Please use a #{record_name} with an empty `password` instead. EOT end
Private Instance Methods
Source
# File lib/shoulda/matchers/active_model/errors.rb, line 42 def model_name model.name end
Source
# File lib/shoulda/matchers/active_model/errors.rb, line 46 def record_name model_name.humanize.downcase end