mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[ci skip] Don't use TrueClass, FalseClass in docs
This sort of documentation style comes from 2009, probably due to
the merging of merb (see 38b608ecab (diff-017d9bc9b1d2bdae199b938d72c15488R120)
).
Rails follows Ruby's convention to define which values are "truthy" or
"falsey", so there is no need to specify that the returned value must
strictly be a TrueClass or FalseClass. /cc @fxn
This commit is contained in:
parent
776e5991a9
commit
352c8473ef
1 changed files with 0 additions and 6 deletions
|
@ -148,9 +148,6 @@ module AbstractController
|
||||||
#
|
#
|
||||||
# ==== Parameters
|
# ==== Parameters
|
||||||
# * <tt>action_name</tt> - The name of an action to be tested
|
# * <tt>action_name</tt> - The name of an action to be tested
|
||||||
#
|
|
||||||
# ==== Returns
|
|
||||||
# * <tt>TrueClass</tt>, <tt>FalseClass</tt>
|
|
||||||
def available_action?(action_name)
|
def available_action?(action_name)
|
||||||
_find_action_name(action_name).present?
|
_find_action_name(action_name).present?
|
||||||
end
|
end
|
||||||
|
@ -171,9 +168,6 @@ module AbstractController
|
||||||
# ==== Parameters
|
# ==== Parameters
|
||||||
# * <tt>name</tt> - The name of an action to be tested
|
# * <tt>name</tt> - The name of an action to be tested
|
||||||
#
|
#
|
||||||
# ==== Returns
|
|
||||||
# * <tt>TrueClass</tt>, <tt>FalseClass</tt>
|
|
||||||
#
|
|
||||||
# :api: private
|
# :api: private
|
||||||
def action_method?(name)
|
def action_method?(name)
|
||||||
self.class.action_methods.include?(name)
|
self.class.action_methods.include?(name)
|
||||||
|
|
Loading…
Reference in a new issue