Sha256: 1c5cff59d4f6696d5bb6a1f502e4cacb01c1065239135e977f2a33bd48a1c2c4
Contents?: true
Size: 815 Bytes
Versions: 45
Compression:
Stored size: 815 Bytes
Contents
class Exemplify < ActiveRecord::Base attr_accessible :manifestation_id, :item_id, :position belongs_to :manifestation belongs_to :item #accepts_nested_attributes_for :item validates_associated :manifestation, :item validates_presence_of :manifestation_id, :item_id validates_uniqueness_of :item_id after_save :reindex after_destroy :reindex acts_as_list :scope => :manifestation_id def reindex manifestation.try(:index) item.try(:index) end end # == Schema Information # # Table name: exemplifies # # id :integer not null, primary key # manifestation_id :integer not null # item_id :integer not null # position :integer # created_at :datetime not null # updated_at :datetime not null #
Version data entries
45 entries across 45 versions & 1 rubygems