File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
lib/active_admin/resource Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,12 @@ def route_prefix
2020 namespace . module_name . try ( :underscore )
2121 end
2222
23+ def route_uncountable?
24+ config = controller . resources_configuration [ :self ]
25+
26+ config [ :route_collection_name ] == config [ :route_instance_name ]
27+ end
28+
2329 private
2430
2531 class RouteBuilder
@@ -30,7 +36,7 @@ def initialize(resource)
3036 def collection_path ( params )
3137 route_name = route_name (
3238 resource . controller . resources_configuration [ :self ] [ :route_collection_name ] ,
33- ( route_uncountable? ? 'index_path' : 'path' )
39+ ( resource . route_uncountable? ? 'index_path' : 'path' )
3440 )
3541
3642 routes . send ( route_name , *route_collection_params ( params ) )
@@ -84,12 +90,6 @@ def belongs_to_name
8490 resource . belongs_to_config . target . resource_name . singular if nested?
8591 end
8692
87- def route_uncountable?
88- config = resource . controller . resources_configuration [ :self ]
89-
90- config [ :route_collection_name ] == config [ :route_instance_name ]
91- end
92-
9393 def routes
9494 Rails . application . routes . url_helpers
9595 end
You can’t perform that action at this time.
0 commit comments