class ActiveAdmin::PageDSL
This is the class where all the register_page blocks are evaluated.
Public Instance Methods
belongs_to(target, options = {})
click to toggle source
# File lib/active_admin/page_dsl.rb, line 28 def belongs_to(target, options = {}) config.belongs_to(target, options) end
content(options = {}, &block)
click to toggle source
Page
content.
The block should define the view using Arbre.
Example:
ActiveAdmin.register "My Page" do content do para "Sweet!" end end
# File lib/active_admin/page_dsl.rb, line 17 def content(options = {}, &block) config.set_page_presenter :index, ActiveAdmin::PagePresenter.new(options, &block) end
page_action(name, options = {}, &block)
click to toggle source
# File lib/active_admin/page_dsl.rb, line 21 def page_action(name, options = {}, &block) config.page_actions << ControllerAction.new(name, options) controller do define_method(name, &block || Proc.new{}) end end