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:41:45 +0100 |
commit | 28cd098d99c52486aecb72aab39105d8abcd52ad (patch) | |
tree | 93b3c7e55d9366ca93496977498cf34d2663fd7d /actionpack/lib/action_dispatch | |
parent | 63e14a7969834f9cc716b9c996aad381b57c0882 (diff) | |
download | rails-28cd098d99c52486aecb72aab39105d8abcd52ad.tar.gz rails-28cd098d99c52486aecb72aab39105d8abcd52ad.tar.bz2 rails-28cd098d99c52486aecb72aab39105d8abcd52ad.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/lib/action_dispatch')
-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 2117cb76b5..ce4d407217 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 |