We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51f3e34 commit 781f26dCopy full SHA for 781f26d
lib/pry-rails/commands/find_route.rb
@@ -1,3 +1,4 @@
1
+# frozen_string_literal: true
2
class PryRails::FindRoute < Pry::ClassCommand
3
match 'find-route'
4
group 'Rails'
@@ -51,7 +52,7 @@ def show_routes(&block)
51
52
all_routes = routes.select(&block)
53
if all_routes.any?
54
grouped_routes = all_routes.group_by { |route| route.defaults[:controller] }
- result = grouped_routes.each_with_object("") do |(controller, routes), res|
55
+ result = grouped_routes.each_with_object(String.new) do |(controller, routes), res|
56
res << "Routes for " + bold(controller.to_s.camelize + "Controller") + "\n"
57
res << "--\n"
58
routes.each do |route|
0 commit comments