module ActionController::ParamsWrapper::ClassMethods

def wrap_parameters(name_or_model_or_options, options = {})

will exclude from a nested hash.
* :exclude - The list of attribute names which parameters wrapper
will wrap into a nested hash.
* :include - The list of attribute names which parameters wrapper
will be enabled.
* :format - The list of formats in which the parameters wrapper
==== Options

# disables parameters wrapping for this controller altogether.
wrap_parameters false

# wraps only +:username+ and +:title+ attributes from parameters.
wrap_parameters :include => [:username, :title]

(+person+, in this case) and the list of attribute names
# wraps parameters by determining the wrapper key from Person class
wrap_parameters Person

# wraps parameters into +params[:person]+ hash
wrap_parameters :person

# enables the parameter wrapper for XML format
wrap_parameters :format => :xml
==== Examples

would use to determine the attribute names from.
Sets the name of the wrapper key, or the model which +ParamsWrapper+
def wrap_parameters(name_or_model_or_options, options = {})
  model = nil
  case name_or_model_or_options
  when Hash
    options = name_or_model_or_options
  when false
    options = options.merge(:format => [])
  when Symbol, String
    options = options.merge(:name => name_or_model_or_options)
  else
    model = name_or_model_or_options
  end
  _set_wrapper_defaults(_wrapper_options.slice(:format).merge(options), model)
end