Sha256: a00f4d0468424525d265cb14615263ea370d6afde88cc00cfab7234bb7203a2f

Contents?: true

Size: 543 Bytes

Versions: 10

Compression:

Stored size: 543 Bytes

Contents

module Alchemy
	class EssenceText < ActiveRecord::Base

		acts_as_essence

		# Require acts_as_ferret only if Ferret full text search is enabled (default).
		# You can disable it in +config/alchemy/config.yml+
		if Alchemy::Config.get(:ferret) == true
			require 'acts_as_ferret'
			acts_as_ferret(
				:fields => {
					:body => {:store => :yes}
				},
				:remote => false
			)
			before_save :check_ferret_indexing
		end

	private

		def check_ferret_indexing
			if self.do_not_index
				self.disable_ferret(:always)
			end
		end

	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-2.1.4 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.3 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.2 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.1 app/models/alchemy/essence_text.rb
alchemy_cms-2.1 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.rc6 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.rc5 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.rc4 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.rc3 app/models/alchemy/essence_text.rb
alchemy_cms-2.1.rc2 app/models/alchemy/essence_text.rb