class ActiveAdmin::ResourceController

It implements actions and helpers for resources.
All Resources Controller inherits from this controller.

def active_admin_config=(config)

def active_admin_config=(config)
  @active_admin_config = config
  defaults  :resource_class => config.resource_class,
            :route_prefix => config.route_prefix,
            :instance_name => config.underscored_resource_name
end

def active_admin_template(template)

Returns the full location to the Active Admin template path
def active_admin_template(template)
  "active_admin/resource/#{template}"
end

def create(options={}, &block)

def create(options={}, &block)
  super(options) do |success, failure|
    block.call(success, failure) if block
    failure.html { render active_admin_template('new') }
  end
end

def csv_filename

and current date such as 'my-articles-2011-06-24.csv'.
Returns a filename for the csv file using the collection_name
def csv_filename
  "#{resource_collection_name.to_s.gsub('_', '-')}-#{Time.now.strftime("%Y-%m-%d")}.csv"
end

def determine_active_admin_layout

that users can render any template inside Active Admin.
2. If we're rendering a custom action, we'll use the active_admin layout so
all the required layout code)
because these actions are subclasses of the Base page (which implementes
1. If we're rendering a standard Active Admin action, we want layout(false)

Determine which layout to use.
def determine_active_admin_layout
  ACTIVE_ADMIN_ACTIONS.include?(params[:action].to_sym) ? false : 'active_admin'
end

def edit(options={}, &block)

def edit(options={}, &block)
  super do |format|
    block.call(format) if block
    format.html { render active_admin_template('edit') }
  end
end

def index(options={}, &block)

def index(options={}, &block)
  super(options) do |format|
    block.call(format) if block
    format.html { render active_admin_template('index') }
    format.csv do
      headers['Content-Type'] = 'text/csv; charset=utf-8'
      headers['Content-Disposition'] = %{attachment; filename="#{csv_filename}"}
      render active_admin_template('index')
    end
  end
end

def inherited(base)

need to install our resource_class method each time we're inherited from.
add in the Base.resource_class class method. To override it, we
Inherited Resources uses the inherited(base) hook method to
def inherited(base)
  super(base)
  base.override_resource_class_methods!
end

def new(options={}, &block)

def new(options={}, &block)
  super do |format|
    block.call(format) if block
    format.html { render active_admin_template('new') }
  end
end

def renderer_for(action)

Returns the renderer class to use for the given action.
def renderer_for(action)
  active_admin_namespace.view_factory["#{action}_page"]
end

def show(options={}, &block)

def show(options={}, &block)
  super do |format|
    block.call(format) if block
    format.html { render active_admin_template('show') }
  end
end

def update(options={}, &block)

def update(options={}, &block)
  super do |success, failure|
    block.call(success, failure) if block
    failure.html { render active_admin_template('edit') }
  end
end