Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Inflector should classify('status') to 'Status' - not 'Statu' #2317

Closed
pzol opened this Issue · 2 comments

3 participants

@pzol
ActiveSupport::Inflector.classify 'status'
 => "Statu" 

instead it should return

ActiveSupport::Inflector.classify 'status'
=> "Status"
@pzol pzol closed this
@pixeltrix
Owner

I'm assuming you closed this as classify works on a plural name like 'statuses' and not a singular name where you need to use camelize - if you close a ticket please give the reason so that it helps other people who might be searching for something similar.

@brianspinos777

"status".pluralize.classify.constantize # => Status

"statuses".pluralize.classify.constantize # => Status

the "classify" method singularizes the string and camelizes it if its snake case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.