Method: ActionController::ParamsWrapper::Options.from_hash

Defined in:
actionpack/lib/action_controller/metal/params_wrapper.rb

.from_hash(hash) ⇒ Object



89
90
91
92
93
94
95
# File 'actionpack/lib/action_controller/metal/params_wrapper.rb', line 89

def self.from_hash(hash)
  name    = hash[:name]
  format  = Array(hash[:format])
  include = hash[:include] && Array(hash[:include]).collect(&:to_s)
  exclude = hash[:exclude] && Array(hash[:exclude]).collect(&:to_s)
  new name, format, include, exclude, nil, nil
end