Module: Para::Ext::Cancan::ControllerResource
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/para/ext/cancan.rb
Instance Method Summary collapse
-
#assign_attributes_with_parent_missing_management(resource) ⇒ Object
Todo : Document why this extension was added ?.
Instance Method Details
#assign_attributes_with_parent_missing_management(resource) ⇒ Object
Todo : Document why this extension was added ?
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/para/ext/cancan.rb', line 12 def assign_attributes_with_parent_missing_management(resource) if @options[:singleton] && parent_resource && resource.respond_to?(:"#{ parent_name }=") resource.send(:"#{ parent_name }=", parent_resource) end initial_attributes.each do |attr_name, value| resource.send(:"#{ attr_name }=", value) end resource end |