aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorTakehiro Adachi <takehiro0740@gmail.com>2012-11-29 12:06:43 +0900
committerTakehiro Adachi <takehiro0740@gmail.com>2012-11-29 12:06:43 +0900
commit0204f8039e04ae83a68740445c5ae315146400a7 (patch)
tree41129d384b12ba70370d0100430f61d2ec131d80 /actionpack/lib/action_view/helpers/url_helper.rb
parent8b270620d5a082546c4dc06f39c5378fcd5d8c2b (diff)
downloadrails-0204f8039e04ae83a68740445c5ae315146400a7.tar.gz
rails-0204f8039e04ae83a68740445c5ae315146400a7.tar.bz2
rails-0204f8039e04ae83a68740445c5ae315146400a7.zip
added examples when options is string
Diffstat (limited to 'actionpack/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb12
1 files changed, 9 insertions, 3 deletions
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 <tt>/shop/checkout?order=desc</tt> action.
+ # Let's say we're in the <tt>http://www.example.com/shop/checkout?order=desc</tt> 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 <tt>/shop/checkout?order=desc&page=1</tt> action.
+ # current_page?('http://www.example.com/shop/checkout')
+ # # => true
+ #
+ # current_page?('/shop/checkout')
+ # # => true
+ #
+ # Let's say we're in the <tt>http://www.example.com/shop/checkout?order=desc&page=1</tt> 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 <tt>/products</tt> action with method POST in case of invalid product.
+ # Let's say we're in the <tt>http://www.example.com/products</tt> action with method POST in case of invalid product.
#
# current_page?(controller: 'product', action: 'index')
# # => false