lib/rails-footnotes/notes/routes_note.rb in josevalim-rails-footnotes-3.5.0 vs lib/rails-footnotes/notes/routes_note.rb in josevalim-rails-footnotes-3.6.0
- old
+ new
@@ -18,11 +18,11 @@
protected
def parse_routes
routes_with_name = ActionController::Routing::Routes.named_routes.to_a.flatten
- return ActionController::Routing::Routes.filtered_routes(:controller => @controller.controller_name).collect do |route|
+ return ActionController::Routing::Routes.filtered_routes(:controller => @controller.controller_path).collect do |route|
# Catch routes name if exists
i = routes_with_name.index(route)
name = i ? routes_with_name[i-1].to_s : ''
# Catch segments requirements
@@ -54,6 +54,6 @@
end
end
if Footnotes::Notes::RoutesNote.included?
ActionController::Routing::RouteSet.send :include, Footnotes::Extensions::Routes
-end
\ No newline at end of file
+end