Adds color attribute to conference

This commit is contained in:
Chrisbr 2014-05-28 13:40:58 +02:00
parent cd83cb2f8f
commit dc080705ae
4 changed files with 10 additions and 3 deletions

View file

@ -9,7 +9,7 @@ class Conference < ActiveRecord::Base
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
:difficulty_levels_attributes, :use_difficulty_levels,
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
:media_id, :media_type
:media_id, :media_type, :color
has_paper_trail
@ -122,7 +122,7 @@ class Conference < ActiveRecord::Base
return false
end
private
##

View file

@ -5,6 +5,7 @@
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
= f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system."
= f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"}
= f.inputs :name => "Scheduling" do
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"

View file

@ -0,0 +1,5 @@
class AddColorToConference < ActiveRecord::Migration
def change
add_column :conferences, :color, :string, default: '#000000'
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: 20140514140013) do
ActiveRecord::Schema.define(version: 20140528072939) do
create_table "answers", force: true do |t|
t.string "title"
@ -78,6 +78,7 @@ ActiveRecord::Schema.define(version: 20140514140013) do
t.boolean "use_volunteers"
t.string "media_id"
t.string "media_type"
t.string "color", default: "#000000"
end
create_table "conferences_questions", id: false, force: true do |t|