Sha256: f33027f8a32887918e292a8e5e97b3c2a95b50250c195857c1a192496141ec15

Contents?: true

Size: 330 Bytes

Versions: 9

Compression:

Stored size: 330 Bytes

Contents

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

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.11 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.9.1 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.9 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.8.1 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.8 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.7 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.6 app/models/alchemy/essence_html.rb
alchemy_cms-2.1.5 app/models/alchemy/essence_html.rb