mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 13:01:02 +00:00
85d592f648
Added model annotations
16 lines
417 B
Ruby
16 lines
417 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: view_counts
|
|
#
|
|
# id :integer not null, primary key
|
|
# viewable_id :integer
|
|
# viewable_type :string(255)
|
|
# ip_address :string(255)
|
|
# logged_in :boolean
|
|
# created_at :date
|
|
#
|
|
|
|
class ViewCount < ActiveRecord::Base
|
|
belongs_to :viewable, :polymorphic => true
|
|
validates_uniqueness_of :ip_address, :scope => [ :viewable_id, :viewable_type ]
|
|
end
|