Module ActiveSupport::CoreExtensions::String::Inflections
In: vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb

Makes it possible to do "posts".singularize that returns "post" and "MegaCoolClass".underscore that returns "mega_cool_class".

Methods

Public Instance methods

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 15
15:         def camelize
16:           Inflector.camelize(self)
17:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 31
31:         def classify
32:           Inflector.classify(self)
33:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 43
43:         def constantize
44:           Inflector.constantize(self)
45:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 23
23:         def demodulize
24:           Inflector.demodulize(self)
25:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 39
39:         def foreign_key(separate_class_name_and_id_with_underscore = true)
40:           Inflector.foreign_key(self, separate_class_name_and_id_with_underscore)
41:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 35
35:         def humanize
36:           Inflector.humanize(self)
37:         end

[Source]

   # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 7
7:         def pluralize
8:           Inflector.pluralize(self)
9:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 11
11:         def singularize
12:           Inflector.singularize(self)
13:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 27
27:         def tableize
28:           Inflector.tableize(self)
29:         end

[Source]

    # File vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb, line 19
19:         def underscore
20:           Inflector.underscore(self)
21:         end

[Validate]