def html_document(attr, options={})
      raise ArgumentError, "html_document requires :scrub option" unless method = options[:scrub]
      before_validation do |record|
        record[attr] = Loofah.scrub_document(record[attr], method).to_s
      end
    end
def html_document(attr, options={})
      raise ArgumentError, "html_document requires :scrub option" unless method = options[:scrub]
      before_validation do |record|
        record[attr] = Loofah.scrub_document(record[attr], method).to_s
      end
    end
:call-seq:
    model.html_document(attribute, :scrub => scrubber_specification)

  Scrub an ActiveRecord attribute +attribute+ as an HTML *document*
  using the method specified by +scrubber_specification+.

  +scrubber_specification+ must be an argument acceptable to Loofah::ScrubBehavior.scrub!, namely:

  * a symbol for one of the built-in scrubbers (see Loofah::Scrubbers for a full list)
  * or a Scrubber instance.