From c9bb099318dd3bc293a6cb4672333147c1cce4b9 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Fri, 25 Nov 2011 12:42:11 +0100 Subject: Display mounted engines in `rake routes` by default --- railties/CHANGELOG.md | 2 +- railties/lib/rails/application/route_inspector.rb | 2 +- railties/test/application/route_inspect_test.rb | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 25d45d886c..1b89bfa6f9 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,6 +1,6 @@ ## Rails 3.2.0 (unreleased) ## -* Add displaying of mounted engine's routes with `rake routes ENGINES=true` *Piotr Sarnacki* +* Display mounted engine's routes in `rake routes`. *Piotr Sarnacki* * Allow to change the loading order of railties with `config.railties_order=` *Piotr Sarnacki* diff --git a/railties/lib/rails/application/route_inspector.rb b/railties/lib/rails/application/route_inspector.rb index 8da7de2584..26652a8e5e 100644 --- a/railties/lib/rails/application/route_inspector.rb +++ b/railties/lib/rails/application/route_inspector.rb @@ -46,7 +46,7 @@ module Rails end def collect_engine_routes(name, rack_app) - return unless rack_app && ENV["ENGINES"] && rack_app.respond_to?(:routes) + return unless rack_app && rack_app.respond_to?(:routes) return if @engines[name] routes = rack_app.routes diff --git a/railties/test/application/route_inspect_test.rb b/railties/test/application/route_inspect_test.rb index 130d4e52f8..2ad5ee6c4c 100644 --- a/railties/test/application/route_inspect_test.rb +++ b/railties/test/application/route_inspect_test.rb @@ -11,8 +11,6 @@ module ApplicationTests end def test_displaying_routes_for_engines - ENV["ENGINES"] = "true" - engine = Class.new(Rails::Engine) do def self.to_s "Blog::Engine" @@ -35,8 +33,6 @@ module ApplicationTests "cart GET /cart(.:format) cart#show" ] assert_equal expected, output - ensure - ENV["ENGINES"] = nil end def test_cart_inspect -- cgit v1.2.3