rails/rails — Issue #4703: [3.2.0] #titleize breaks when call on html_safe string
Author: hartator
Created: 2012-01-26 16:37:31+00:00
State: open

Hey there!

Thanks a lot for rails! Great piece of software! :)

I come across an issue with rails 3.2.0, #titleize doesn't seem to work when called on html_safe string. To reproduce :

[1] pry(main)> "Test string".html_safe.titleize
NoMethodError: undefined method `downcase' for nil:NilClass
from /Users/Ioxtrem/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.0/lib/active_support/inflector/methods.rb:97:in `block in humanize'

It works fine on rails 3.1.3.