Module: ActiveAdmin::ResourceController::DataAccess

Included in:
ActiveAdmin::ResourceController
Defined in:
lib/active_admin/resource_controller/data_access.rb

Overview

This module overrides most of the data access methods in Inherited Resources to provide Active Admin with it’s data.

The module also deals with authorization and resource callbacks.

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/active_admin/resource_controller/data_access.rb', line 12

def self.included(base)
  base.class_exec do
    include Callbacks
    include ScopeChain

    define_active_admin_callbacks :build, :create, :update, :save, :destroy

    helper_method :current_scope
  end
end