Permalink
Browse files

added examples when options is string

  • Loading branch information...
1 parent 8b27062 commit 0204f8039e04ae83a68740445c5ae315146400a7 @take take committed Nov 29, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 actionpack/lib/action_view/helpers/url_helper.rb
View
12 actionpack/lib/action_view/helpers/url_helper.rb
@@ -498,7 +498,7 @@ def mail_to(email_address, name = nil, html_options = {})
# 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 @@ def mail_to(email_address, name = nil, html_options = {})
# 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 @@ def mail_to(email_address, name = nil, html_options = {})
# 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

0 comments on commit 0204f80

Please sign in to comment.