From feabc3b954b5ca24db46b7881b9532da61143529 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Sat, 14 Jun 2014 22:53:20 +0530 Subject: [PATCH] Adds lodging description to conference --- app/models/conference.rb | 3 ++- app/views/admin/conference/edit.html.haml | 1 + .../20140614171853_add_lodging_description_to_conference.rb | 5 +++++ db/schema.rb | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20140614171853_add_lodging_description_to_conference.rb diff --git a/app/models/conference.rb b/app/models/conference.rb index cdc82963..6d48e314 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -15,7 +15,8 @@ class Conference < ActiveRecord::Base :registration_description, :ticket_description, :sponsorship_levels_attributes, :sponsors_attributes, :facebook_url, - :google_url, :twitter_url, :sponsor_description, :sponsor_email + :google_url, :twitter_url, :sponsor_description, :sponsor_email, + :lodging_description has_paper_trail diff --git a/app/views/admin/conference/edit.html.haml b/app/views/admin/conference/edit.html.haml index bace7d37..38accd19 100644 --- a/app/views/admin/conference/edit.html.haml +++ b/app/views/admin/conference/edit.html.haml @@ -18,6 +18,7 @@ = f.input :ticket_description, hint: 'This will appear in the Tickets segment of the splash' = f.input :sponsor_description, hint: 'This will appear in the sponsor segment of the splash' = f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers' + = f.input :lodging_description, hint: 'This will appear in the lodging segement of the splash' = f.inputs :name => "Media" do - if !@conference.logo.blank? diff --git a/db/migrate/20140614171853_add_lodging_description_to_conference.rb b/db/migrate/20140614171853_add_lodging_description_to_conference.rb new file mode 100644 index 00000000..37dd2c30 --- /dev/null +++ b/db/migrate/20140614171853_add_lodging_description_to_conference.rb @@ -0,0 +1,5 @@ +class AddLodgingDescriptionToConference < ActiveRecord::Migration + def change + add_column :conferences, :lodging_description, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index a3d9c00c..a522dd50 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: 20140613083115) do +ActiveRecord::Schema.define(version: 20140614171853) do create_table "answers", force: true do |t| t.string "title" @@ -86,6 +86,7 @@ ActiveRecord::Schema.define(version: 20140613083115) do t.string "google_url" t.text "sponsor_description" t.string "sponsor_email" + t.text "lodging_description" end create_table "conferences_questions", id: false, force: true do |t|