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 -- Posted via http://www.ruby-forum.com/.
> 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?I''d say feature, not bug. Inflector.titleize calls function underscore, which translates - to _ and then calls function humanize which converts underscores to spaces... Regards, Rimantas -- http://rimantas.com/
Bleh, bug IMO. I can understand converting underscores to spaces, but not hyphens. Plus, titleize screws up apostrophes: JOE''S -> Joe''S Joe -- Posted via http://www.ruby-forum.com/.
Submitted (for the apostrophes part, anyway): http://dev.rubyonrails.org/ticket/4607 Cheers, David On Apr 6, 2006, at 1:26 PM, Joe wrote:> Bleh, bug IMO. I can understand converting underscores to spaces, but > not hyphens. Plus, titleize screws up apostrophes: > > JOE''S -> Joe''S > > Joe > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Maybe Matching Threads
- [patch] fix bytesize in exception template; multibyte titleize
- Quick Question: Opposite of Titleize?
- newbie question about .titlecase of .titleize
- How to get variable names in a function?
- how to automatically select certain columns using for loop in dataframe