diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2011-12-26 11:31:22 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2011-12-26 11:54:27 +0100 |
commit | d7cfb636367f2f929d07ade9060d35a2cf7ad20b (patch) | |
tree | 7a59f0e134e73e9ce882cbef389d4387315986ac /actionpack | |
parent | 4cf40d04e4193494b4854c771f78a105aeee8e76 (diff) | |
download | rails-d7cfb636367f2f929d07ade9060d35a2cf7ad20b.tar.gz rails-d7cfb636367f2f929d07ade9060d35a2cf7ad20b.tar.bz2 rails-d7cfb636367f2f929d07ade9060d35a2cf7ad20b.zip |
Correctly display rack apps with dynamic constraints in RoutesInspector
If you used dynamic constraint like that:
scope :constraint => MyConstraint.new do
mount RackApp => "/foo"
end
routes were not displayed correctly when using `rake routes`.
This commit fixes it. If you want nice display of dynamic
constraints in `rake routes` output, please just override
to_s method in your constraint's class.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 4d83c6dee1..8667f5fb90 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -16,7 +16,7 @@ module ActionDispatch end end - attr_reader :app + attr_reader :app, :constraints def initialize(app, constraints, request) @app, @constraints, @request = app, constraints, request |