Class: ActiveAdmin::Views::DashboardSection

Inherits:
Panel
  • Object
show all
Defined in:
lib/active_admin/views/dashboard_section_renderer.rb

Instance Method Summary collapse

Methods inherited from Panel

#add_child, #children?

Instance Method Details

#build(section) ⇒ Object



5
6
7
8
9
# File 'lib/active_admin/views/dashboard_section_renderer.rb', line 5

def build(section)
  @section = section
  super(title, :icon => @section.icon)
  instance_eval &@section.block
end

#titleObject (protected)



13
14
15
# File 'lib/active_admin/views/dashboard_section_renderer.rb', line 13

def title
  I18n.t("active_admin.sections.#{@section.name.to_s}", :default => @section.name.to_s.titleize)
end