lib/active_admin/page_dsl.rb in activeadmin-0.4.0 vs lib/active_admin/page_dsl.rb in activeadmin-0.4.1
- old
+ new
@@ -15,7 +15,14 @@
# end
#
def content(options = {}, &block)
config.set_page_presenter :index, ActiveAdmin::PagePresenter.new(options, &block)
end
+
+ def page_action(name, options = {}, &block)
+ config.page_actions << ControllerAction.new(name, options)
+ controller do
+ define_method(name, &block || Proc.new{})
+ end
+ end
end
end