From 2c27119e8e9f760aa6a241ca81253c332d82a991 Mon Sep 17 00:00:00 2001 From: Gopesh Tulsyan Date: Fri, 13 Jun 2014 00:44:21 +0530 Subject: [PATCH] Added sponsor description and email to conference --- app/models/conference.rb | 2 +- app/views/admin/conference/edit.html.haml | 2 ++ .../20140606102331_add_sponsor_description_to_conference.rb | 5 +++++ db/migrate/20140606102358_add_sponsor_email_to_conference.rb | 5 +++++ db/schema.rb | 2 ++ 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20140606102331_add_sponsor_description_to_conference.rb create mode 100644 db/migrate/20140606102358_add_sponsor_email_to_conference.rb diff --git a/app/models/conference.rb b/app/models/conference.rb index b9794564..271b6833 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -15,7 +15,7 @@ class Conference < ActiveRecord::Base :registration_description, :ticket_description, :sponsorship_levels_attributes, :sponsors_attributes, :facebook_url, - :google_url, :twitter_url + :google_url, :twitter_url, :sponsor_description, :sponsor_email has_paper_trail diff --git a/app/views/admin/conference/edit.html.haml b/app/views/admin/conference/edit.html.haml index 23026283..ce1d66e4 100644 --- a/app/views/admin/conference/edit.html.haml +++ b/app/views/admin/conference/edit.html.haml @@ -16,6 +16,8 @@ = f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" } = f.input :registration_description, hint: 'This description will appear in registration segment of the splash' = 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.inputs :name => "Media" do - if !@conference.logo.blank? diff --git a/db/migrate/20140606102331_add_sponsor_description_to_conference.rb b/db/migrate/20140606102331_add_sponsor_description_to_conference.rb new file mode 100644 index 00000000..39d6de6e --- /dev/null +++ b/db/migrate/20140606102331_add_sponsor_description_to_conference.rb @@ -0,0 +1,5 @@ +class AddSponsorDescriptionToConference < ActiveRecord::Migration + def change + add_column :conferences, :sponsor_description, :text + end +end diff --git a/db/migrate/20140606102358_add_sponsor_email_to_conference.rb b/db/migrate/20140606102358_add_sponsor_email_to_conference.rb new file mode 100644 index 00000000..7dc0b56e --- /dev/null +++ b/db/migrate/20140606102358_add_sponsor_email_to_conference.rb @@ -0,0 +1,5 @@ +class AddSponsorEmailToConference < ActiveRecord::Migration + def change + add_column :conferences, :sponsor_email, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index a164ce3f..fd64f124 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -84,6 +84,8 @@ ActiveRecord::Schema.define(version: 20140612181230) do t.string "twitter_url" t.string "facebook_url" t.string "google_url" + t.text "sponsor_description" + t.string "sponsor_email" end create_table "conferences_questions", id: false, force: true do |t|