Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename RouteInspector to RoutesInspector

Follow the consistency defined in dbc43bc.
  • Loading branch information...
commit 9c4afcf4cd6290c127374744805dea360bfa21c5 1 parent 21c5bc9
@carlosantoniodasilva carlosantoniodasilva authored
View
3  actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -83,11 +83,10 @@ def stderr_logger
@stderr_logger ||= ActiveSupport::Logger.new($stderr)
end
- private
def formatted_routes(exception)
return false unless @routes_app.respond_to?(:routes)
if exception.is_a?(ActionController::RoutingError) || exception.is_a?(ActionView::Template::Error)
- inspector = ActionDispatch::Routing::RouteInspector.new
+ inspector = ActionDispatch::Routing::RoutesInspector.new
inspector.format(@routes_app.routes.routes).join("\n")
end
end
View
2  actionpack/lib/action_dispatch/routing/inspector.rb
@@ -62,7 +62,7 @@ def engine?
##
# This class is just used for displaying route information when someone
# executes `rake routes`. People should not use this class.
- class RouteInspector # :nodoc:
+ class RoutesInspector # :nodoc:
def initialize
@engines = Hash.new
end
View
4 actionpack/test/dispatch/routing/inspector_test.rb
@@ -5,10 +5,10 @@
module ActionDispatch
module Routing
- class RouteInspectTest < ActiveSupport::TestCase
+ class RoutesInspectorTest < ActiveSupport::TestCase
def setup
@set = ActionDispatch::Routing::RouteSet.new
- @inspector = ActionDispatch::Routing::RouteInspector.new
+ @inspector = ActionDispatch::Routing::RoutesInspector.new
app = ActiveSupport::OrderedOptions.new
app.config = ActiveSupport::OrderedOptions.new
app.config.assets = ActiveSupport::OrderedOptions.new
View
2  railties/lib/rails/info_controller.rb
@@ -15,7 +15,7 @@ def properties
end
def routes
- inspector = ActionDispatch::Routing::RouteInspector.new
+ inspector = ActionDispatch::Routing::RoutesInspector.new
@info = inspector.format(_routes.routes).join("\n")
end
View
2  railties/lib/rails/tasks/routes.rake
@@ -2,6 +2,6 @@ desc 'Print out all defined routes in match order, with names. Target specific c
task :routes => :environment do
all_routes = Rails.application.routes.routes
require 'action_dispatch/routing/inspector'
- inspector = ActionDispatch::Routing::RouteInspector.new
+ inspector = ActionDispatch::Routing::RoutesInspector.new
puts inspector.format(all_routes, ENV['CONTROLLER']).join "\n"
end
Please sign in to comment.
Something went wrong with that request. Please try again.