Add vote functionality to tracks

This commit is contained in:
Rishabh Singh 2019-08-09 17:33:42 +05:30
parent 8b2f2b538e
commit 92b09c7de4
18 changed files with 237 additions and 19 deletions

View file

@ -0,0 +1,6 @@
class AddPolymorphicToVote < ActiveRecord::Migration[5.2]
def change
add_column :votes, :votable_type, :string
add_column :votes, :votable_id, :integer
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_06_03_143107) do
ActiveRecord::Schema.define(version: 2019_08_07_165246) do
create_table "answers", force: :cascade do |t|
t.string "title"
@ -660,6 +660,8 @@ ActiveRecord::Schema.define(version: 2019_06_03_143107) do
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
t.string "votable_type"
t.integer "votable_id"
end
create_table "vpositions", force: :cascade do |t|