0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-02-20 11:02:49 +00:00
ensl.org/vendor/plugins/acts-as-readable/lib/reading.rb

7 lines
245 B
Ruby
Raw Normal View History

class Reading < ActiveRecord::Base
belongs_to :user
belongs_to :readable, :polymorphic => true
validates_presence_of :user_id, :readable_id, :readable_type
validates_uniqueness_of :user_id, :scope => [:readable_id, :readable_type]
end