提交 14d1dc21 编写于 作者: A Aditya Kapoor

[ci skip] remove duplicate doc for current_page?

上级 8bf28252
......@@ -471,57 +471,45 @@ def mail_to(email_address, name = nil, html_options = {}, &block)
# True if the current request URI was generated by the given +options+.
#
# ==== Examples
# Let's say we're in the <tt>http://www.example.com/shop/checkout?order=desc</tt> action.
# 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
#
# current_page?(controller: 'shop', action: 'checkout')
# # => true
#
# current_page?(controller: 'shop', action: 'checkout', order: 'asc')
# # => false
#
# current_page?(action: 'checkout')
# # => true
#
# current_page?(controller: 'library', action: 'checkout')
# # => false
#
# current_page?('http://www.example.com/shop/checkout')
# # => true
#
# current_page?('/shop/checkout')
# current_page?(controller: 'shop', action: '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')
# current_page?(controller: 'shop', action: 'checkout', order: 'asc')
# # => false
#
# current_page?(controller: 'shop', action: 'checkout')
# # => true
#
# current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '1')
# # => true
#
# current_page?(controller: 'shop', action: 'checkout', order: 'desc', page: '2')
# # => false
#
# current_page?(controller: 'shop', action: 'checkout', order: 'desc')
# # => false
# current_page?('http://www.example.com/shop/checkout')
# # => true
#
# current_page?(action: 'checkout')
# current_page?('/shop/checkout')
# # => true
#
# current_page?(controller: 'library', action: 'checkout')
# # => false
# current_page?('http://www.example.com/shop/checkout?order=desc&page=1')
# # => true
#
# 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
#
# We can also pass in the symbol arguments instead of strings.
#
def current_page?(options)
unless request
raise "You cannot use helpers that need to determine the current " \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册