Improving surveys system: showing surveys in admin UI as they will be for the user

This commit is contained in:
mdeniz 2016-06-29 17:23:01 +02:00
parent 335608e6c4
commit 03168b4efe
15 changed files with 213 additions and 46 deletions

View file

@ -0,0 +1,5 @@
class AddTargetToSurveys < ActiveRecord::Migration
def change
add_column :surveys, :target, :integer, default: 0
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160628093634) do
ActiveRecord::Schema.define(version: 20160629145954) do
create_table "ahoy_events", force: :cascade do |t|
t.uuid "visit_id", limit: 16
@ -392,8 +392,9 @@ ActiveRecord::Schema.define(version: 20160628093634) do
t.text "description"
t.integer "surveyable_id"
t.string "surveyable_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "target", default: 0
end
add_index "surveys", ["surveyable_type", "surveyable_id"], name: "index_surveys_on_surveyable_type_and_surveyable_id"