Permalink
Browse files

Add AD::Route#to_s

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
1 parent 459e9b2 commit c8cba7db76d7128dfd8fd03de0e085c81bbed92a @rubys rubys committed with josh Jan 20, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_dispatch/routing/route.rb
@@ -44,6 +44,12 @@ def segment_keys
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

0 comments on commit c8cba7d

Please sign in to comment.