aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGosha Arinich <me@goshakkk.name>2013-01-07 16:09:22 +0300
committerGosha Arinich <me@goshakkk.name>2013-01-07 17:37:02 +0300
commitae1f86fab5f80d00dc75541aef04eea8a349fb97 (patch)
tree275fff453e0f837faef55ad865492162135c482c
parent411de5ae379190613d86032d7bad53ec0191653a (diff)
downloadrails-ae1f86fab5f80d00dc75541aef04eea8a349fb97.tar.gz
rails-ae1f86fab5f80d00dc75541aef04eea8a349fb97.tar.bz2
rails-ae1f86fab5f80d00dc75541aef04eea8a349fb97.zip
access `@path` and `@routes` via reader methods in journey
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb2
-rw-r--r--actionpack/lib/action_dispatch/journey/routes.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index f8a53227f3..d3988cf31e 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -45,7 +45,7 @@ module ActionDispatch
end
def segments
- @path.names
+ path.names
end
def required_keys
diff --git a/actionpack/lib/action_dispatch/journey/routes.rb b/actionpack/lib/action_dispatch/journey/routes.rb
index 9d59c9265e..a99d6d0d6a 100644
--- a/actionpack/lib/action_dispatch/journey/routes.rb
+++ b/actionpack/lib/action_dispatch/journey/routes.rb
@@ -16,12 +16,12 @@ module ActionDispatch
end
def length
- @routes.length
+ routes.length
end
alias :size :length
def last
- @routes.last
+ routes.last
end
def each(&block)