Exception: TrustedAttributes::UntrustedAttributesError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/trusted_attributes.rb

Instance Method Summary collapse

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

#messageObject



9
10
11
12
# File 'lib/trusted_attributes.rb', line 9

def message
  list = @diff.map { |attr| ":#{attr}" }.join(', ')
  "Some attributes that were sent are not trusted. Mark them as trusted by setting `trust #{list}`"
end