Sha256: d6305ea9c9af2135a324e24bc6583c01b0c6df7282b9258adac933d14518756c

Contents?: true

Size: 321 Bytes

Versions: 55

Compression:

Stored size: 321 Bytes

Contents

module HoboFields
  module Types
    class HtmlString < RawHtmlString

      include SanitizeHtml

      def self.declared(model, name, options)
        model.before_save { |record| record[name] = HoboFields::SanitizeHtml.sanitize(record[name]) }
      end

      HoboFields.register_type(:html, self)
    end

  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
hobo_fields-2.1.2 lib/hobo_fields/types/html_string.rb
hobo_fields-2.1.1 lib/hobo_fields/types/html_string.rb
hobo_fields-2.1.0 lib/hobo_fields/types/html_string.rb
hobo_fields-2.1.0.pre4 lib/hobo_fields/types/html_string.rb
hobo_fields-2.1.0.pre3 lib/hobo_fields/types/html_string.rb
hobo_fields-2.1.0.pre2 lib/hobo_fields/types/html_string.rb
hobo_fields-2.1.0.pre1 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.1 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre10 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre9 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre8 lib/hobo_fields/types/html_string.rb
hobo_fields-1.3.3 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre7 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre6 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre5 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre4 lib/hobo_fields/types/html_string.rb
hobo_fields-1.3.2 lib/hobo_fields/types/html_string.rb
hobo_fields-1.3.1 lib/hobo_fields/types/html_string.rb
hobo_fields-2.0.0.pre3 lib/hobo_fields/types/html_string.rb