class ActiveAdmin::Resource


by calling the #active_admin_config method.
The instance of the current resource is available in ResourceController and views
a new Resource instance within the given Namespace.
When you register a resource (ActiveAdmin.register Post) you are actually creating
Resource is the primary data storage for resource configuration in Active Admin

def belongs_to(target, options = {})

def belongs_to(target, options = {})
  @belongs_to = Resource::BelongsTo.new(self, target, options)
  self.navigation_menu_name = target unless @belongs_to.optional?
  controller.send :belongs_to, target, options.dup
end

def belongs_to?

Do we belong to another resource?
def belongs_to?
  !!belongs_to_config
end

def belongs_to_config

def belongs_to_config
  @belongs_to
end

def breadcrumb

def breadcrumb
  instance_variable_defined?(:@breadcrumb) ? @breadcrumb : namespace.breadcrumb
end

def clear_collection_actions!

def clear_collection_actions!
  @collection_actions = []
end

def clear_member_actions!

Clears all the member actions this resource knows about
def clear_member_actions!
  @member_actions = []
end

def csv_builder

The csv builder for this resource
def csv_builder
  @csv_builder || default_csv_builder
end

def decorator_class

def decorator_class
  ActiveSupport::Dependencies.constantize(decorator_class_name) if decorator_class_name
end

def default_csv_builder

def default_csv_builder
  @default_csv_builder ||= CSVBuilder.default_for_resource(resource_class)
end

def defined_actions

Return only defined resource actions
def defined_actions
  controller.instance_methods.map(&:to_sym) & ResourceController::ACTIVE_ADMIN_ACTIONS
end

def find_resource(id)

def find_resource(id)
  resource = resource_class.public_send(method_for_find, id)
  decorator_class ? decorator_class.new(resource) : resource
end

def method_for_find

def method_for_find
  resources_configuration[:self][:finder] || :"find_by_#{resource_class.primary_key}"
end

def resource_class

will point to the Post class
The class this resource wraps. If you register the Post model, Resource#resource_class
def resource_class
  ActiveSupport::Dependencies.constantize(resource_class_name)
end

def resource_column_names

def resource_column_names
  resource_class.column_names
end

def resource_quoted_column_name(column)

def resource_quoted_column_name(column)
  resource_class.connection.quote_column_name(column)
end

def resource_table_name

def resource_table_name
  resource_class.quoted_table_name
end

def sort_order

def sort_order
  @sort_order ||= (resource_class.respond_to?(:primary_key) ? resource_class.primary_key.to_s : 'id') + '_desc'
end