module WrapAttributes::AttributesWrapper

Public Instance Methods

process_action(*args) click to toggle source
Calls superclass method
# File lib/wrap_attributes/attributes_wrapper.rb, line 17
def process_action(*args)
  _perform_attribute_parameter_wrapping
  super
end

Private Instance Methods

_perform_attribute_parameter_wrapping() click to toggle source
# File lib/wrap_attributes/attributes_wrapper.rb, line 28
def _perform_attribute_parameter_wrapping
  wrapped_keys = request.request_parameters.keys
  wrap_attribute_parameters = _wrap_attribute_parameters(request.request_parameters,
                                                         _attribute_options)
  filtered_attribute_parameters = _wrap_attribute_parameters(request.filtered_parameters.slice(*wrapped_keys),
                                                    _attribute_options)

  request.parameters.merge! wrap_attribute_parameters
  request.request_parameters.merge! wrap_attribute_parameters

  request.filtered_parameters.merge! filtered_attribute_parameters
end
_wrap_attribute_parameters(parameters, attributes) click to toggle source
# File lib/wrap_attributes/attributes_wrapper.rb, line 24
def _wrap_attribute_parameters(parameters, attributes)
  WrapAttributes::convert(parameters, attributes)
end