From 17307736e8aba937db542db616bd56ab5b9b09f6 Mon Sep 17 00:00:00 2001 From: Chrisbr Date: Wed, 14 May 2014 16:37:19 +0200 Subject: [PATCH] Removes rating desc column from cfp --- app/models/call_for_papers.rb | 4 +++- app/views/admin/callforpapers/show.html.haml | 1 - db/migrate/20140514140013_remove_rating_desc_from_cfp.rb | 9 +++++++++ db/schema.rb | 3 +-- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20140514140013_remove_rating_desc_from_cfp.rb diff --git a/app/models/call_for_papers.rb b/app/models/call_for_papers.rb index 10cb7f80..e92a2447 100644 --- a/app/models/call_for_papers.rb +++ b/app/models/call_for_papers.rb @@ -1,5 +1,7 @@ class CallForPapers < ActiveRecord::Base - attr_accessible :start_date, :end_date, :hard_deadline, :description, :schedule_changes, :rating, :rating_desc, :schedule_public + attr_accessible :start_date, :end_date, :hard_deadline, + :description, :schedule_changes, :rating, + :schedule_public belongs_to :conference validates_presence_of :start_date, :end_date, :hard_deadline diff --git a/app/views/admin/callforpapers/show.html.haml b/app/views/admin/callforpapers/show.html.haml index e13ffeab..fe168abd 100644 --- a/app/views/admin/callforpapers/show.html.haml +++ b/app/views/admin/callforpapers/show.html.haml @@ -10,5 +10,4 @@ = f.input :schedule_changes = f.input :schedule_public = f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals." - = f.input :rating_desc, :label => "Rating Description", :hint => "Enter comments about voting process.", :input_html => {:value => "1 is for 'I don't like this proposal',\n2 is for 'I am ok with this proposal.',\n3 is for 'I love this proposal!'", :rows => 5, :class => "span6"} = f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"} diff --git a/db/migrate/20140514140013_remove_rating_desc_from_cfp.rb b/db/migrate/20140514140013_remove_rating_desc_from_cfp.rb new file mode 100644 index 00000000..c8bd9bb4 --- /dev/null +++ b/db/migrate/20140514140013_remove_rating_desc_from_cfp.rb @@ -0,0 +1,9 @@ +class RemoveRatingDescFromCfp < ActiveRecord::Migration + def up + remove_column :call_for_papers, :rating_desc + end + + def down + add_column :call_for_papers, :rating_desc, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 64570e66..3ea44dfc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140414131028) do +ActiveRecord::Schema.define(version: 20140514140013) do create_table "answers", force: true do |t| t.string "title" @@ -29,7 +29,6 @@ ActiveRecord::Schema.define(version: 20140414131028) do t.datetime "updated_at" t.boolean "schedule_changes", default: false t.integer "rating", default: 3 - t.text "rating_desc" t.boolean "schedule_public" end