diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2012-05-18 23:21:20 +0200 |
---|---|---|
committer | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2012-05-18 23:55:39 +0200 |
commit | 5f7bfb77786ab02db213f9563c199fc5b7f53f3e (patch) | |
tree | cea3442789306f3f3e0ce225c9a98c8ddc1a7225 /actionpack | |
parent | 61fc10d23382c7ba57c67391063a2113fb3f2abc (diff) | |
download | rails-5f7bfb77786ab02db213f9563c199fc5b7f53f3e.tar.gz rails-5f7bfb77786ab02db213f9563c199fc5b7f53f3e.tar.bz2 rails-5f7bfb77786ab02db213f9563c199fc5b7f53f3e.zip |
Fix inspecting route redirections, closes #6369
This commit fixes route inspection in `rake routes`
Before:
foo /foo(.:format) :controller#:action"
After:
foo /foo(.:format) Redirect (301)
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/redirection.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index 95c588c00a..3e2a9e232d 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -35,6 +35,10 @@ module ActionDispatch def path(params, request) block.call params, request end + + def inspect + "Redirect (#{status})" + end end class OptionRedirect < Redirect # :nodoc: |