diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2011-11-25 12:42:11 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2011-11-25 12:45:58 +0100 |
commit | c9bb099318dd3bc293a6cb4672333147c1cce4b9 (patch) | |
tree | 71a1b38c5a81f5fb5ed7f5cc59587087fdc2d4fa | |
parent | fcacc6986ab60f1fb2e423a73bf47c7abd7b191d (diff) | |
download | rails-c9bb099318dd3bc293a6cb4672333147c1cce4b9.tar.gz rails-c9bb099318dd3bc293a6cb4672333147c1cce4b9.tar.bz2 rails-c9bb099318dd3bc293a6cb4672333147c1cce4b9.zip |
Display mounted engines in `rake routes` by default
-rw-r--r-- | railties/CHANGELOG.md | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/route_inspector.rb | 2 | ||||
-rw-r--r-- | 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 |