class ActiveAdmin::Views::Pages::Show

Public Instance Methods

attributes_table(*args, &block) click to toggle source
# File lib/active_admin/views/pages/show.rb, line 28
def attributes_table(*args, &block)
  opts = args.extract_options!
  table_title = if opts.has_key?(:title)
                  render_or_call_method_or_proc_on(resource, opts[:title])
                else
                  ActiveAdmin::Localizers.resource(active_admin_config).t(:details)
                end
  panel(table_title) do
    attributes_table_for resource, *args, &block
  end
end
config() click to toggle source
Calls superclass method
# File lib/active_admin/views/pages/show.rb, line 7
def config
  active_admin_config.get_page_presenter(:show) || super
end
main_content() click to toggle source
# File lib/active_admin/views/pages/show.rb, line 19
def main_content
  if config.block
    # Eval the show config from the controller
    instance_exec resource, &config.block
  else
    default_main_content
  end
end
title() click to toggle source
# File lib/active_admin/views/pages/show.rb, line 11
def title
  if config[:title]
    render_or_call_method_or_proc_on(resource, config[:title])
  else
    assigns[:page_title] || default_title
  end
end

Protected Instance Methods

default_title() click to toggle source
# File lib/active_admin/views/pages/show.rb, line 42
def default_title
  display_name(resource)
end