diff options
-rw-r--r-- | lib/tasks/grape.rake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/tasks/grape.rake b/lib/tasks/grape.rake index 9980e0b7984..f13812cec92 100644 --- a/lib/tasks/grape.rake +++ b/lib/tasks/grape.rake @@ -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 |