Module: RailsCom::Parameters

Defined in:
lib/rails_com/action_controller/parameters.rb

Instance Method Summary collapse

Instance Method Details

#require(key) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/rails_com/action_controller/parameters.rb', line 3

def require(key)
  begin
    super
  rescue ArgumentError => e
    Rails.logger.debug e.backtrace
    self[key]
  ensure
    @required_params ||= []
    @required_params << key
  end
end