# This class exists so including the Rails HTML sanitization helpers doesn't polute your models.
class RailsSanitize
  include ActionView::Helpers::SanitizeHelper
end
require 'action_pack/version'

# This class exists so including the Rails HTML sanitization helpers doesn't polute your models.
class RailsSanitize
  if ActionPack::VERSION::MINOR >= 2 # Rails 2.2+
    extend ActionView::Helpers::SanitizeHelper::ClassMethods
  else # Rails 2.1 or earlier (note: xss_terminate does not support Rails 1.x)
    include ActionView::Helpers::SanitizeHelper
  end
end

Support Rails 2.2 as well as 2.x by checking the ActionPack::VERSION (technique stolen from Erubis)
Support Rails 2.2 as well as 2.x by checking the ActionPack::VERSION (technique stolen from Erubis)
