item.title = ‘alpha-bravo’
item.title = item.title.titleize
puts item.title
alpha bravo
I didn’t notice this with 1.0 - a new bug in 1.1?
Joe
item.title = ‘alpha-bravo’
item.title = item.title.titleize
puts item.title
alpha bravo
I didn’t notice this with 1.0 - a new bug in 1.1?
Joe
item.title = ‘alpha-bravo’
item.title = item.title.titleize
puts item.titlealpha bravo
I didn’t notice this with 1.0 - a new bug in 1.1?
I’d say feature, not bug. Inflector.titleize calls function underscore,
which
translates - to _ and then calls function humanize which converts
underscores to
spaces…
Bleh, bug IMO. I can understand converting underscores to spaces, but
not hyphens. Plus, titleize screws up apostrophes:
JOE’S -> Joe’S
Joe
Thanks!
Joe
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs