aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-08-04 18:20:07 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-08-04 18:20:07 -0700
commit3300fdedc748993b378288c6cbc3113885c955ed (patch)
treed514e1247a0958df6e360fe41e15a51e4a1ccaf6 /actionpack/lib/action_dispatch/routing
parentcaadbd85c1a50ff8bc50d08aa01c046278a9eb1c (diff)
downloadrails-3300fdedc748993b378288c6cbc3113885c955ed.tar.gz
rails-3300fdedc748993b378288c6cbc3113885c955ed.tar.bz2
rails-3300fdedc748993b378288c6cbc3113885c955ed.zip
avoid testing only_path
we know that this call only wants the path returned, so lets call a method that returns the path.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index ce1fe2e451..5b3651aaee 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -697,6 +697,10 @@ module ActionDispatch
options.delete(:script_name) { '' }
end
+ def path_for(options, route_name = nil) # :nodoc:
+ url_for(options, route_name, PATH)
+ end
+
# The +options+ argument must be a hash whose keys are *symbols*.
def url_for(options, route_name = nil, url_strategy = UNKNOWN)
options = default_url_options.merge options