mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Fix RoutePareser#routes and add spec for it
This commit is contained in:
@@ -11,7 +11,7 @@ module Rswag
|
||||
def routes
|
||||
::Rails.application.routes.routes.select do |route|
|
||||
route.defaults[:controller] == controller
|
||||
end.each_with_object({}) do |tree, route|
|
||||
end.each_with_object({}) do |route, tree|
|
||||
path = path_from(route)
|
||||
verb = verb_from(route)
|
||||
tree[path] ||= { params: params_from(route), actions: {} }
|
||||
|
||||
Reference in New Issue
Block a user