Sha256: bd5687cbc8ee423e31f7fd31cca721175db85d29785a30c4db827fbeef5d2c3f
Contents?: true
Size: 602 Bytes
Versions: 41
Compression:
Stored size: 602 Bytes
Contents
# Monkey path inherited_resources # # # Pull request https://github.com/josevalim/inherited_resources/pull/237 module InheritedResources::BaseHelpers private def resource_params @resource_params ||= build_resource_params end def build_resource_params rparams = [whitelisted_params || params[resource_request_name] || params[resource_instance_name] || {}] rparams << as_role if role_given? rparams end def whitelisted_params whitelist_method = :"#{ resource_request_name }_params" respond_to?(whitelist_method, true) && self.send(whitelist_method) end end
Version data entries
41 entries across 41 versions & 2 rubygems