diff options
author | Sam Ruby <rubys@intertwingly.net> | 2010-01-20 10:56:06 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-20 10:56:27 -0600 |
commit | c8cba7db76d7128dfd8fd03de0e085c81bbed92a (patch) | |
tree | 216f05de481b2ae59932e42584293e0ef5de1ec9 | |
parent | 459e9b29d4b9922d5ce3f87dd62fd43e752ac3da (diff) | |
download | rails-c8cba7db76d7128dfd8fd03de0e085c81bbed92a.tar.gz rails-c8cba7db76d7128dfd8fd03de0e085c81bbed92a.tar.bz2 rails-c8cba7db76d7128dfd8fd03de0e085c81bbed92a.zip |
Add AD::Route#to_s
Signed-off-by: Joshua Peek <josh@joshpeek.com>
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route.rb b/actionpack/lib/action_dispatch/routing/route.rb index f1431e7a37..e6e44d3546 100644 --- a/actionpack/lib/action_dispatch/routing/route.rb +++ b/actionpack/lib/action_dispatch/routing/route.rb @@ -44,6 +44,12 @@ module ActionDispatch def to_a [@app, @conditions, @defaults, @name] end + + def to_s + @to_s ||= begin + "%-6s %-40s %s" % [(verb || :any).to_s.upcase, path, requirements.inspect] + end + end end end end |