Exception: TrustedKeys::Error::Usage

Inherits:
StandardError
  • Object
show all
Defined in:
lib/trusted_keys/error/usage.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Usage

Returns a new instance of Usage.



4
5
6
# File 'lib/trusted_keys/error/usage.rb', line 4

def initialize(params)
  @params = params
end

Instance Method Details

#messageObject



8
9
10
11
12
13
# File 'lib/trusted_keys/error/usage.rb', line 8

def message
  "\n\nparams => #{@params.inspect}\n\n" +
  "Error: Before using `trusted_attributes` you must set the " +
  "trusted keys in the controller, for examples: `trust :post` " +
  "or `trust :title, :body, for: 'post'`"
end