Skip to content

Commit

Permalink
Remove explicit "aliased as" documentation
Browse files Browse the repository at this point in the history
Most of these are redundant because rdoc handles these itself, but
`titlecase` on `ActiveSupport::Inflector` does not exist so that one is
just incorrect.
  • Loading branch information
skipkayhil committed May 18, 2023
1 parent 77ce7d6 commit b3c6a9a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/abstract_controller/translation.rb
Expand Up @@ -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
Expand All @@ -29,7 +29,7 @@ def translate(key, **options)
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
Expand Down
2 changes: 0 additions & 2 deletions activesupport/lib/active_support/core_ext/object/to_query.rb
Expand Up @@ -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?
Expand Down
Expand Up @@ -97,8 +97,6 @@ def safe_constantize
# '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
Expand All @@ -124,8 +122,6 @@ def camelize(first_letter = :upper)
# '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)
Expand Down
2 changes: 0 additions & 2 deletions activesupport/lib/active_support/inflector/methods.rb
Expand Up @@ -184,8 +184,6 @@ def downcase_first(string)
# 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"
Expand Down

0 comments on commit b3c6a9a

Please sign in to comment.