From 0204f8039e04ae83a68740445c5ae315146400a7 Mon Sep 17 00:00:00 2001 From: Takehiro Adachi Date: Thu, 29 Nov 2012 12:06:43 +0900 Subject: added examples when options is string --- actionpack/lib/action_view/helpers/url_helper.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_view/helpers/url_helper.rb') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index fd671c9c07..fa516cf91b 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -498,7 +498,7 @@ module ActionView # True if the current request URI was generated by the given +options+. # # ==== Examples - # Let's say we're in the /shop/checkout?order=desc action. + # Let's say we're in the http://www.example.com/shop/checkout?order=desc action. # # current_page?(action: 'process') # # => false @@ -515,7 +515,13 @@ module ActionView # current_page?(controller: 'library', action: 'checkout') # # => false # - # Let's say we're in the /shop/checkout?order=desc&page=1 action. + # current_page?('http://www.example.com/shop/checkout') + # # => true + # + # current_page?('/shop/checkout') + # # => true + # + # Let's say we're in the http://www.example.com/shop/checkout?order=desc&page=1 action. # # current_page?(action: 'process') # # => false @@ -538,7 +544,7 @@ module ActionView # current_page?(controller: 'library', action: 'checkout') # # => false # - # Let's say we're in the /products action with method POST in case of invalid product. + # Let's say we're in the http://www.example.com/products action with method POST in case of invalid product. # # current_page?(controller: 'product', action: 'index') # # => false -- cgit v1.2.3