mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 17:31:27 +00:00
4199062a9c
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
|