Module: AbAdmin::Views::ManagerHelpers
- Defined in:
- lib/ab_admin/views/manager_helpers.rb
Instance Method Summary collapse
- #action_item_admin_path(name, record = nil) ⇒ Object
- #form_builder ⇒ Object
- #search_builder ⇒ Object
- #show_builder ⇒ Object
- #table_builder ⇒ Object
Instance Method Details
#action_item_admin_path(name, record = nil) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/ab_admin/views/manager_helpers.rb', line 21 def action_item_admin_path(name, record=nil) custom_action = manager.custom_action_for(name, self) if custom_action.collection? admin_collection_action_path(:model_name => resource_collection_name, :custom_action => custom_action.name) else record ||= resource admin_member_action_path(:model_name => resource_collection_name, :id => record.id, :custom_action => custom_action.name) end end |
#form_builder ⇒ Object
13 14 15 |
# File 'lib/ab_admin/views/manager_helpers.rb', line 13 def form_builder manager.form ||= ::AbAdmin::Config::Form.default_for_model(resource_class, :skip => [:id, :created_at, :updated_at, :lft, :rgt, :depth]) end |
#search_builder ⇒ Object
9 10 11 |
# File 'lib/ab_admin/views/manager_helpers.rb', line 9 def search_builder manager.search ||= ::AbAdmin::Config::Search.default_for_model(resource_class) end |
#show_builder ⇒ Object
17 18 19 |
# File 'lib/ab_admin/views/manager_helpers.rb', line 17 def show_builder manager.show ||= ::AbAdmin::Config::Show.default_for_model(resource_class) end |
#table_builder ⇒ Object
5 6 7 |
# File 'lib/ab_admin/views/manager_helpers.rb', line 5 def table_builder manager.table ||= ::AbAdmin::Config::Table.default_for_model(resource_class) end |