Method: ActiveAdmin::ResourceController::DataAccess#find_resource

Defined in:
lib/active_admin/resource_controller/data_access.rb

#find_resourceActiveRecord::Base (protected)

Does the actual work of finding a resource in the database. This method uses the finder method as defined in InheritedResources.

Returns:

  • (ActiveRecord::Base)

    An active record object.



102
103
104
# File 'lib/active_admin/resource_controller/data_access.rb', line 102

def find_resource
  scoped_collection.send method_for_find, params[:id]
end