Exception: TrustedAttributes::UntrustedAttributesError
- Inherits:
-
StandardError
- Object
- StandardError
- TrustedAttributes::UntrustedAttributesError
- Defined in:
- lib/trusted_attributes.rb
Instance Method Summary collapse
-
#initialize(diff) ⇒ UntrustedAttributesError
constructor
A new instance of UntrustedAttributesError.
- #message ⇒ Object
Constructor Details
#initialize(diff) ⇒ UntrustedAttributesError
Returns a new instance of UntrustedAttributesError.
5 6 7 |
# File 'lib/trusted_attributes.rb', line 5 def initialize(diff) @diff = diff end |
Instance Method Details
#message ⇒ Object
9 10 11 12 |
# File 'lib/trusted_attributes.rb', line 9 def list = @diff.map { |attr| ":#{attr}" }.join(', ') "Some attributes that were sent are not trusted. Mark them as trusted by setting `trust #{list}`" end |