1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

added examples when options is string

This commit is contained in:
Takehiro Adachi 2012-11-29 12:06:43 +09:00
parent 8b270620d5
commit 0204f8039e

View file

@ -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