Class: UseCases::Params

Inherits:
ActiveSupport::HashWithIndifferentAccess
  • Object
show all
Defined in:
lib/use_cases/params.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Params

Returns a new instance of Params.



7
8
9
10
11
12
13
# File 'lib/use_cases/params.rb', line 7

def initialize(params)
  if defined?(Rails) && params.is_a?(ActionController::Parameters)
    super(params.permit!.to_h)
  else
    super(params)
  end
end