Exception: Shoulda::Matchers::ActiveModel::NonNullableBooleanError
- Inherits:
-
Error
- Object
- StandardError
- Error
- Shoulda::Matchers::ActiveModel::NonNullableBooleanError
- Defined in:
- lib/shoulda/matchers/active_model/errors.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
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
#attribute ⇒ Object
Returns the value of attribute attribute.
13 14 15 |
# File 'lib/shoulda/matchers/active_model/errors.rb', line 13 def attribute @attribute end |
Class Method Details
.create(attribute) ⇒ Object
9 10 11 |
# File 'lib/shoulda/matchers/active_model/errors.rb', line 9 def self.create(attribute) super(attribute: attribute) end |
Instance Method Details
#message ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/shoulda/matchers/active_model/errors.rb', line 15 def "You have specified that your model's \#{attribute} should ensure inclusion of nil.\nHowever, \#{attribute} is a boolean column which does not allow null values.\nHence, this test will fail and there is no way to make it pass.\n EOT\nend\n".strip |