Sha256: e45b65cd5d2caad1a8d93bd96865b06991f8b7be861ede6ba89e4a99827bd323

Contents?: true

Size: 601 Bytes

Versions: 27

Compression:

Stored size: 601 Bytes

Contents

# == Schema Information
#
# Table name: alchemy_essence_htmls
#
#  id         :integer          not null, primary key
#  source     :text
#  creator_id :integer
#  updater_id :integer
#  created_at :datetime         not null
#  updated_at :datetime         not null
#

module Alchemy
  class EssenceHtml < ActiveRecord::Base
    acts_as_essence ingredient_column: 'source'

    # Returns the first x (default = 30) (HTML escaped) characters from self.source for the Element#preview_text method.
    def preview_text(maxlength = 30)
      ::CGI.escapeHTML(source.to_s)[0..maxlength]
    end

  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
alchemy_cms-3.2.1 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.3 app/models/alchemy/essence_html.rb
lc_alchemy_cms-3.2.1 app/models/alchemy/essence_html.rb
lc_alchemy_cms-3.2.0 app/models/alchemy/essence_html.rb
alchemy_cms-3.2.0 app/models/alchemy/essence_html.rb
alchemy_cms-3.2.0.rc1 app/models/alchemy/essence_html.rb
alchemy_cms-3.2.0.beta app/models/alchemy/essence_html.rb
alchemy_cms-3.1.1 app/models/alchemy/essence_html.rb
alchemy_cms-3.0.4 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.rc3 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.rc2 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.rc1 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.beta6 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.beta5 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.beta4 app/models/alchemy/essence_html.rb
alchemy_cms-3.0.3 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.beta3 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.beta2 app/models/alchemy/essence_html.rb
alchemy_cms-3.1.0.beta1 app/models/alchemy/essence_html.rb