Sha256: a54def67119f76117f4eeabda22aff7205b988e46a937c0d9b9687e03a18bb85
Contents?: true
Size: 829 Bytes
Versions: 12
Compression:
Stored size: 829 Bytes
Contents
class Own < ActiveRecord::Base attr_accessible :agent_id, :item_id belongs_to :agent #, :counter_cache => true #, :polymorphic => true, :validate => true belongs_to :item #, :counter_cache => true #, :validate => true validates_associated :agent, :item validates_presence_of :agent, :item validates_uniqueness_of :item_id, :scope => :agent_id after_save :reindex after_destroy :reindex acts_as_list :scope => :item attr_accessor :item_identifier def reindex agent.try(:index) item.try(:index) end end # == Schema Information # # Table name: owns # # id :integer not null, primary key # agent_id :integer not null # item_id :integer not null # position :integer # created_at :datetime not null # updated_at :datetime not null #
Version data entries
12 entries across 12 versions & 1 rubygems