Exception: SmartParams::PathAlreadyDefinedException

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

Instance Method Summary collapse

Constructor Details

#initialize(path:) ⇒ PathAlreadyDefinedException

Returns a new instance of PathAlreadyDefinedException.



5
6
7
8
# File 'lib/smart_params/path_already_defined_exception.rb', line 5

def initialize(path:)
  @path = path
  super(message)
end

Instance Method Details

#messageObject



10
11
12
# File 'lib/smart_params/path_already_defined_exception.rb', line 10

def message
  "/#{@path.join('/')} was already taken as a field path"
end