Sha256: b105fd498a394c201ec9c9e36bd29d6e299b5ef1309d1880635d2cab8541dcf7

Contents?: true

Size: 657 Bytes

Versions: 20

Compression:

Stored size: 657 Bytes

Contents

# == Schema Information
#
# Table name: alchemy_essence_richtexts
#
#  id            :integer          not null, primary key
#  body          :text
#  stripped_body :text
#  public        :boolean
#  creator_id    :integer
#  updater_id    :integer
#  created_at    :datetime         not null
#  updated_at    :datetime         not null
#

module Alchemy
  class EssenceRichtext < ActiveRecord::Base
    acts_as_essence preview_text_column: 'stripped_body'

    before_save :strip_content

    def has_tinymce?
      true
    end

    private

    def strip_content
      self.stripped_body = Rails::Html::FullSanitizer.new.sanitize(body)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
alchemy_cms-3.6.7 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.6 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.5 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.4 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.3 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.2 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.1 app/models/alchemy/essence_richtext.rb
alchemy_cms-4.0.0.beta app/models/alchemy/essence_richtext.rb
alchemy_cms-3.6.0 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.5.0 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.4.2 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.5.0.rc2 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.5.0.rc1 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.4.1 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.3.3 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.3.2 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.4.0 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.4.0.rc1 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.3.1 app/models/alchemy/essence_richtext.rb
alchemy_cms-3.3.0 app/models/alchemy/essence_richtext.rb