Class: ActiveAdmin::Views::Pages::Layout
- Defined in:
- lib/active_admin/views/pages/layout.rb
Overview
Acts as a standard rails Layout for use when logged out or when rendering custom actions.
Instance Method Summary collapse
-
#main_content ⇒ Object
Render the content_for(:layout) into the main content area.
- #title ⇒ Object
Methods inherited from Base
Instance Method Details
#main_content ⇒ Object
Render the content_for(:layout) into the main content area
14 15 16 17 18 19 20 21 |
# File 'lib/active_admin/views/pages/layout.rb', line 14 def main_content content_for_layout = content_for(:layout) if content_for_layout.is_a?(Arbre::Element) current_arbre_element.add_child content_for_layout.children else text_node content_for_layout end end |
#title ⇒ Object
9 10 11 |
# File 'lib/active_admin/views/pages/layout.rb', line 9 def title assigns[:page_title] || I18n.t("active_admin.#{params[:action]}", :default => params[:action].to_s.titleize) end |