开发者

ActiveSupport::Inflector in a Ramaze project?

I just upgraded to ActiveSupport 3 and lost all my string methods like "camelize", "titleize", and the like. It broke things all over my project, and so far I've fixed them by re-writing those methods myself, but there has to be a better way. I do realize that it's probably a good thing that ActiveSup开发者_Python百科port no longer monkey patches String globally, but, it was working great for me. Is there anyway I can patch these things back onto string, of find a new way to call them?


You're probably doing this:

require 'active_support'

Which requires the very, very basics of Active Support.

What you want is this:

require 'active_support/core_ext/string'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜