Implement Event Ratings
This commit is contained in:
parent
5be1ad52ee
commit
20f4853487
67 changed files with 1298 additions and 378 deletions
14
db/migrate/20160922205552_create_average_caches.rb
Normal file
14
db/migrate/20160922205552_create_average_caches.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class CreateAverageCaches < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :average_caches do |t|
|
||||
t.belongs_to :rater
|
||||
t.belongs_to :rateable, polymorphic: true
|
||||
t.float :avg, null: false
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :average_caches
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue