update Grape routes to work with current version of Grape
This commit is contained in:
parent
1bbc99f1c8
commit
014db24aae
|
@ -2,7 +2,13 @@ namespace :grape do
|
|||
desc 'Print compiled grape routes'
|
||||
task routes: :environment do
|
||||
API::API.routes.each do |route|
|
||||
puts route
|
||||
puts "#{route.options[:method]} #{route.path} - #{route_description(route.options)}"
|
||||
end
|
||||
end
|
||||
|
||||
def route_description(options)
|
||||
if options[:settings][:description]
|
||||
options[:settings][:description][:description]
|
||||
end || ''
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue