Module: ActiveAdmin::Resource::Routes
- Included in:
- Page, ActiveAdmin::Resource
- Defined in:
- lib/active_admin/resource/routes.rb
Defined Under Namespace
Classes: RouteBuilder
Instance Method Summary collapse
- #route_batch_action_path(params = {}, additional_params = {}) ⇒ Object
- #route_builder ⇒ Object
-
#route_collection_path(params = {}, additional_params = {}) ⇒ String
The path to this resource collection page.
- #route_edit_instance_path(resource, additional_params = {}) ⇒ Object
-
#route_instance_path(resource, additional_params = {}) ⇒ String
The path to this resource collection page.
-
#route_prefix ⇒ Object
Returns the routes prefix for this config.
- #route_uncountable? ⇒ Boolean
Instance Method Details
#route_batch_action_path(params = {}, additional_params = {}) ⇒ Object
11 12 13 |
# File 'lib/active_admin/resource/routes.rb', line 11 def route_batch_action_path(params = {}, additional_params = {}) route_builder.batch_action_path(params, additional_params) end |
#route_builder ⇒ Object
31 32 33 |
# File 'lib/active_admin/resource/routes.rb', line 31 def route_builder @route_builder ||= RouteBuilder.new(self) end |
#route_collection_path(params = {}, additional_params = {}) ⇒ String
Returns the path to this resource collection page.
7 8 9 |
# File 'lib/active_admin/resource/routes.rb', line 7 def route_collection_path(params = {}, additional_params = {}) route_builder.collection_path(params, additional_params) end |
#route_edit_instance_path(resource, additional_params = {}) ⇒ Object
22 23 24 |
# File 'lib/active_admin/resource/routes.rb', line 22 def route_edit_instance_path(resource, additional_params = {}) route_builder.edit_instance_path(resource, additional_params) end |
#route_instance_path(resource, additional_params = {}) ⇒ String
Returns the path to this resource collection page.
18 19 20 |
# File 'lib/active_admin/resource/routes.rb', line 18 def route_instance_path(resource, additional_params = {}) route_builder.instance_path(resource, additional_params) end |
#route_prefix ⇒ Object
Returns the routes prefix for this config
27 28 29 |
# File 'lib/active_admin/resource/routes.rb', line 27 def route_prefix namespace.route_prefix end |
#route_uncountable? ⇒ Boolean
35 36 37 38 39 |
# File 'lib/active_admin/resource/routes.rb', line 35 def route_uncountable? config = resources_configuration[:self] config[:route_collection_name] == config[:route_instance_name] end |