module ActiveAdmin::Resource::Routes
Public Instance Methods
route_collection_path(params = {})
click to toggle source
@params params [Hash] of params: {study_id: 3} @return [String] the path to this resource collection page @example “/admin/posts”
# File lib/active_admin/resource/routes.rb, line 7 def route_collection_path(params = {}) RouteBuilder.new(self).collection_path(params) end
route_instance_path(resource)
click to toggle source
@param resource [ActiveRecord::Base] the instance we want the path of @return [String] the path to this resource collection page @example “/admin/posts/1”
# File lib/active_admin/resource/routes.rb, line 14 def route_instance_path(resource) RouteBuilder.new(self).instance_path(resource) end
route_prefix()
click to toggle source
Returns the routes prefix for this config
# File lib/active_admin/resource/routes.rb, line 19 def route_prefix namespace.module_name.try(:underscore) end
route_uncountable?()
click to toggle source
# File lib/active_admin/resource/routes.rb, line 23 def route_uncountable? config = controller.resources_configuration[:self] config[:route_collection_name] == config[:route_instance_name] end