Sha256: 712af12a74dcadbb31b28e933d5e2f86e012854ab5b9abfb55ae8f48f94993c4

Contents?: true

Size: 676 Bytes

Versions: 25

Compression:

Stored size: 676 Bytes

Contents

class Shopping::CartItem < Auth::Shopping::CartItem

	create_es_index(INDEX_DEFINITION)

	def set_autocomplete_tags
		self.tags = []
		self.tags << self.name 
		self.tags << self.description 
		self.tags << "item"
		if self.personality_id
			personality = Auth.configuration.personality_class.constantize.find(self.personality_id)
			personality.add_info(self.tags)
		end
	end

	def as_indexed_json(options={})
        {
            tags: self.tags,
            public: self.public,
            document_type: Auth::OmniAuth::Path.pathify(self.class.name.to_s),
            resource_id: self.resource_id,
            resource_class: self.resource_class
        }
    end
	
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.9 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.8 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.7 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.6 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.5 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.4 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.3 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.2 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.1 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.5.0 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.9 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.8 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.7 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.6 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.5 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.4 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.3 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.2 spec/dummy/app/models/shopping/cart_item.rb
wordjelly-auth-1.4.0 spec/dummy/app/models/shopping/cart_item.rb