Friday, 19 December 2014

Ading buttons and action Active admin

Active Admin is a framework for creating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.

1. Adding custom buttons: if you want to add custom buttons for any resource then add the following code inside the 'admin/resource.rb'

  action_item do
    link_to "something_text" path_for _action, :method => :method_type(get or post)
  end

2.Adding custom actions: if you want to add custom action for active admin then add following code inside AdminController

def action_name
// your source code here
end

3. Adding routes for custom controller: Add routes for your action inside routes.rb file like



No comments:

Post a Comment