Using action view helpers (strip_tags) in a rake task?

Hi all -

I’ve got a rake task that migrates some old data (simple, loop through
old stuff, modify it a bit, and save it to the new system). That all
works great.

However, I’d like to use strip_tags() to remove all HTML from some of
fields I’m converting, but I can’t figure out how to
include/use/require/load/etc the right stuff to make this work.

For now, I just copied the strip_tags() definition out of the
text_helper.rb file, but that is evil™…

Am I just missing something obvious?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs