module ActiveAdmin::ResourceController::DataAccess
def assign_attributes(resource, attributes)
-
(ActiveRecord::Base)
- resource
Parameters:
-
attributes
(Array
) -- ttributes [Array resource
(ActiveRecord::Base
) --
def assign_attributes(resource, attributes) if resource.respond_to?(:assign_attributes) resource.assign_attributes(*attributes) else resource.attributes = attributes[0] end resource end