mirror of https://github.com/rails/rails
Remove explicit "aliased as" documentation
Most of these are redundant because rdoc handles these itself, but `titlecase` on `ActiveSupport::Inflector` does not exist so that one is just incorrect.
This commit is contained in:
parent
77ce7d6f94
commit
b3c6a9adf0
|
@ -6,7 +6,7 @@ module AbstractController
|
|||
module Translation
|
||||
mattr_accessor :raise_on_missing_translations, default: false
|
||||
|
||||
# Delegates to <tt>I18n.translate</tt>. Also aliased as <tt>t</tt>.
|
||||
# Delegates to <tt>I18n.translate</tt>.
|
||||
#
|
||||
# When the given key starts with a period, it will be scoped by the current
|
||||
# controller and action. So if you call <tt>translate(".foo")</tt> from
|
||||
|
@ -29,7 +29,7 @@ module AbstractController
|
|||
end
|
||||
alias :t :translate
|
||||
|
||||
# Delegates to <tt>I18n.localize</tt>. Also aliased as <tt>l</tt>.
|
||||
# Delegates to <tt>I18n.localize</tt>.
|
||||
def localize(object, **options)
|
||||
I18n.localize(object, **options)
|
||||
end
|
||||
|
|
|
@ -72,8 +72,6 @@ class Hash
|
|||
#
|
||||
# The string pairs "key=value" that conform the query string
|
||||
# are sorted lexicographically in ascending order.
|
||||
#
|
||||
# This method is also aliased as +to_param+.
|
||||
def to_query(namespace = nil)
|
||||
query = filter_map do |key, value|
|
||||
unless (value.is_a?(Hash) || value.is_a?(Array)) && value.empty?
|
||||
|
|
|
@ -97,8 +97,6 @@ class String
|
|||
# 'active_record/errors'.camelize # => "ActiveRecord::Errors"
|
||||
# 'active_record/errors'.camelize(:lower) # => "activeRecord::Errors"
|
||||
#
|
||||
# +camelize+ is also aliased as +camelcase+.
|
||||
#
|
||||
# See ActiveSupport::Inflector.camelize.
|
||||
def camelize(first_letter = :upper)
|
||||
case first_letter
|
||||
|
@ -124,8 +122,6 @@ class String
|
|||
# 'x-men: the last stand'.titleize # => "X Men: The Last Stand"
|
||||
# 'string_ending_with_id'.titleize(keep_id_suffix: true) # => "String Ending With Id"
|
||||
#
|
||||
# +titleize+ is also aliased as +titlecase+.
|
||||
#
|
||||
# See ActiveSupport::Inflector.titleize.
|
||||
def titleize(keep_id_suffix: false)
|
||||
ActiveSupport::Inflector.titleize(self, keep_id_suffix: keep_id_suffix)
|
||||
|
|
|
@ -184,8 +184,6 @@ module ActiveSupport
|
|||
# optional parameter +keep_id_suffix+ to true.
|
||||
# By default, this parameter is false.
|
||||
#
|
||||
# +titleize+ is also aliased as +titlecase+.
|
||||
#
|
||||
# titleize('man from the boondocks') # => "Man From The Boondocks"
|
||||
# titleize('x-men: the last stand') # => "X Men: The Last Stand"
|
||||
# titleize('TheManWithoutAPast') # => "The Man Without A Past"
|
||||
|
|
Loading…
Reference in New Issue