From 4b0887e0f33d1cf000cbc9eae6a64d9d95120d21 Mon Sep 17 00:00:00 2001 From: Matt Barringer Date: Mon, 11 Feb 2013 18:10:43 +0100 Subject: [PATCH] Add IRC nick to the Person page --- app/models/person.rb | 2 +- app/views/devise/registrations/edit.html.haml | 1 + db/schema.rb | 15 ++++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 74f7fe78..59019745 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -1,5 +1,5 @@ class Person < ActiveRecord::Base - attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar + attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar, :irc_nickname has_many :event_people, :dependent => :destroy has_many :events, :through => :event_people, :uniq => true diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index f5fad635..a7cac5a1 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -4,6 +4,7 @@ = f.inputs :name => "Profile" do = f.fields_for :person do |p| = p.inputs :first_name, :last_name, :public_name + = p.input :irc_nickname, :label => "IRC nick:" = p.input :company, :label => "Affiliation", :hint => "This could be a company, a user group, or nothing at all." = image_tag current_user.person.avatar(:small) = p.input :avatar, :label => "Picture", :hint => "Upload a new picture." diff --git a/db/schema.rb b/db/schema.rb index d0201c71..61601c24 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130202131932) do +ActiveRecord::Schema.define(:version => 20130211170728) do create_table "call_for_papers", :force => true do |t| t.date "start_date", :null => false @@ -160,22 +160,23 @@ ActiveRecord::Schema.define(:version => 20130202131932) do t.integer "user_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.string "irc_nickname" end create_table "registrations", :force => true do |t| t.integer "person_id" t.integer "conference_id" - t.boolean "attending_social_events", :default => true - t.boolean "attending_social_events_with_partner", :default => false - t.boolean "using_affiliated_lodging", :default => true + t.boolean "attending_social_events", :default => true + t.boolean "attending_with_partner", :default => false + t.boolean "using_affiliated_lodging", :default => true t.datetime "arrival" t.datetime "departure" t.text "additional_speakers" - 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 "dietary_choice_id" t.text "other_dietary_choice" - t.boolean "handicapped_access_required", :default => false + t.boolean "handicapped_access_required", :default => false end create_table "roles", :force => true do |t|