Sha256: 62ef936ca99dabaed7308130809e2f8441904994929c66ebe3b3981dfea47749
Contents?: true
Size: 505 Bytes
Versions: 2
Compression:
Stored size: 505 Bytes
Contents
module Recommendable class StashedItem < ActiveRecord::Base self.table_name = 'recommendable_stashed_items' attr_accessible :user_id, :stashable_id, :stashable_type belongs_to :user, :class_name => Recommendable.user_class.to_s, :foreign_key => :user_id belongs_to :stashable, :polymorphic => :true validates :user_id, :uniqueness => { :scope => [:stashable_id, :stashable_type], :message => "has already stashed this item" } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
recommendable-0.1.8 | app/models/recommendable/stashed_item.rb |
recommendable-0.1.6 | app/models/recommendable/stashed_item.rb |