Add vote functionality to tracks
This commit is contained in:
parent
8b2f2b538e
commit
92b09c7de4
18 changed files with 237 additions and 19 deletions
6
db/migrate/20190807165246_add_polymorphic_to_vote.rb
Normal file
6
db/migrate/20190807165246_add_polymorphic_to_vote.rb
Normal 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
|
||||
|
|
@ -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|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue