Method: AllParams#initialize
- Defined in:
- lib/params/all_params.rb
#initialize(params, request_params) ⇒ AllParams
Returns a new instance of AllParams.
2 3 4 5 6 7 8 9 10 |
# File 'lib/params/all_params.rb', line 2 def initialize(params, request_params) @params = params @request_params = request_params # this class acts as a virtual hash on top of two real hashes for all write-related methods (which need to be overriden) # the values from both hashes are also synchronized in this class to avoid having to override all read-related methods self.merge!(@params) self.merge!(@request_params) end |