0

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 ActiveSupport 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?

Phil Kulak
  • 6,960
  • 8
  • 45
  • 50

1 Answers1

2

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'
Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261
  • Thank you so much! I actually had to require a couple things. Seems a little hacky... but at least it works now! require 'active_support/lazy_load_hooks' require 'active_support/core_ext/string' – Phil Kulak Nov 17 '10 at 18:07