diff options
author | Zachary Scott <mail@zzak.io> | 2015-08-12 20:56:28 -0400 |
---|---|---|
committer | Zachary Scott <mail@zzak.io> | 2015-08-12 20:56:28 -0400 |
commit | 32424b6bfbb8bde796d417a907e3e1e9a5d22b76 (patch) | |
tree | 75ce0a70f212faefa0c1fc140d993bc873b586e3 /activesupport/lib | |
parent | ba7602b881b95666c3f076f8522d9eeaac8eeefb (diff) | |
parent | 6d077205b5269fc03c5318cecf378dd2592f2f4a (diff) | |
download | rails-32424b6bfbb8bde796d417a907e3e1e9a5d22b76.tar.gz rails-32424b6bfbb8bde796d417a907e3e1e9a5d22b76.tar.bz2 rails-32424b6bfbb8bde796d417a907e3e1e9a5d22b76.zip |
Merge pull request #21217 from myrridin/myrridin-documentation-updates
[ci skip] Documentation: Switch around a common phrase for readability
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/inflections.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/inflector/methods.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 0d5e02cd77..b2e713077c 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -172,7 +172,7 @@ class String # uses the +pluralize+ method on the last word in the string. # # 'RawScaledScorer'.tableize # => "raw_scaled_scorers" - # 'egg_and_ham'.tableize # => "egg_and_hams" + # 'ham_and_egg'.tableize # => "ham_and_eggs" # 'fancyCategory'.tableize # => "fancy_categories" def tableize ActiveSupport::Inflector.tableize(self) @@ -182,7 +182,7 @@ class String # Note that this returns a string and not a class. (To convert to an actual class # follow +classify+ with +constantize+.) # - # 'egg_and_hams'.classify # => "EggAndHam" + # 'ham_and_eggs'.classify # => "HamAndEgg" # 'posts'.classify # => "Post" def classify ActiveSupport::Inflector.classify(self) diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index 899ba70af6..ab5372ac43 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -160,7 +160,7 @@ module ActiveSupport # This method uses the #pluralize method on the last word in the string. # # tableize('RawScaledScorer') # => "raw_scaled_scorers" - # tableize('egg_and_ham') # => "egg_and_hams" + # tableize('ham_and_egg') # => "ham_and_eggs" # tableize('fancyCategory') # => "fancy_categories" def tableize(class_name) pluralize(underscore(class_name)) @@ -170,7 +170,7 @@ module ActiveSupport # names to models. Note that this returns a string and not a Class (To # convert to an actual class follow +classify+ with #constantize). # - # classify('egg_and_hams') # => "EggAndHam" + # classify('ham_and_eggs') # => "HamAndEgg" # classify('posts') # => "Post" # # Singular names are not handled correctly: |