Sha256: 94f74a5540d57c1b427c6cf4f9b79f19710f88d89b3261b081b6259494c9cf4b

Contents?: true

Size: 593 Bytes

Versions: 16

Compression:

Stored size: 593 Bytes

Contents

# frozen_string_literal: true

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

module Alchemy
  # @deprecated
  class EssenceHtml < BaseRecord
    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

16 entries across 16 versions & 1 rubygems

Version Path
alchemy_cms-6.1.10 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.9 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.8 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.7 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.6 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.5 app/models/alchemy/essence_html.rb
alchemy_cms-6.0.14 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.4 app/models/alchemy/essence_html.rb
alchemy_cms-6.0.13 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.3 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.2 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.1 app/models/alchemy/essence_html.rb
alchemy_cms-6.1.0 app/models/alchemy/essence_html.rb
alchemy_cms-6.0.12 app/models/alchemy/essence_html.rb
alchemy_cms-6.0.11 app/models/alchemy/essence_html.rb
alchemy_cms-6.0.10 app/models/alchemy/essence_html.rb