rails/rails — pull request #4162 by alexeymuranov (2011-12-24 13:36:59+00:00)
Title: Add parameter to #classify singular table names

Allow `ActiveSupport::Inflector.classify` to treat singular table names by adding a parameter `singular` with default value `false`:

```ruby
def classify(table_name, singular = false)
# strip out any leading schema name
underscored_name = table_name.to_s.sub(/.*\./, '')
underscored_name = singularize(underscored_name) unless singular
camelize(underscored_name)
end
```

See
https://github.com/rails/rails/blob/3f92e5e40720bd3c00935b2df42d9c781248b9e7/activesupport/lib/active_support/core_ext/string/inflections.rb#L175
and a possible use of this in
https://github.com/rails/rails/blob/a5fa310f406e299a1ac54d1a227bde93b7ce282b/activerecord/lib/active_record/fixtures.rb#L391