mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
e59e8ac8e7
- Add .params to models and update controllers - Add afk time to gather - Reannotate models - Fix rspec problem by using latest rspec plugins from github
20 lines
514 B
Ruby
20 lines
514 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: view_counts
|
|
#
|
|
# id :integer not null, primary key
|
|
# ip_address :string(255)
|
|
# logged_in :boolean
|
|
# viewable_type :string(255)
|
|
# created_at :date
|
|
# viewable_id :integer
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_view_counts_on_viewable_type_and_viewable_id (viewable_type,viewable_id)
|
|
#
|
|
|
|
class ViewCount < ActiveRecord::Base
|
|
belongs_to :viewable, :polymorphic => true
|
|
validates_uniqueness_of :ip_address, :scope => [ :viewable_id, :viewable_type ]
|
|
end
|