From 077036d67cbd3ef510cce3a3b5d8230409579880 Mon Sep 17 00:00:00 2001 From: Matt Barringer Date: Wed, 6 Feb 2013 20:26:41 +0100 Subject: [PATCH] Rename attending_social_events_with_partner --- app/models/registration.rb | 2 +- app/views/admin/registrations/show.html.haml | 2 +- app/views/admin/registrations/show.pdf.prawn | 2 +- app/views/conference_registration/register.html.haml | 2 +- ...6192339_rename_attending_social_events_with_partner.rb | 8 ++++++++ 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20130206192339_rename_attending_social_events_with_partner.rb diff --git a/app/models/registration.rb b/app/models/registration.rb index ddb01971..4f5c231e 100644 --- a/app/models/registration.rb +++ b/app/models/registration.rb @@ -5,7 +5,7 @@ class Registration < ActiveRecord::Base has_one :supporter_registration - attr_accessible :person_id, :conference_id, :attending_social_events, :attending_social_events_with_partner, + attr_accessible :person_id, :conference_id, :attending_social_events, :attending_with_partner, :using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id, :handicapped_access_required, :supporter_registration_attributes diff --git a/app/views/admin/registrations/show.html.haml b/app/views/admin/registrations/show.html.haml index a3e5d168..df3dc0b1 100644 --- a/app/views/admin/registrations/show.html.haml +++ b/app/views/admin/registrations/show.html.haml @@ -37,7 +37,7 @@ %td = registration.attending_social_events %td - = registration.attending_social_events_with_partner + = registration.attending_with_partner %td = registration.arrival %td diff --git a/app/views/admin/registrations/show.pdf.prawn b/app/views/admin/registrations/show.pdf.prawn index 38a8031a..0a9dfc4e 100644 --- a/app/views/admin/registrations/show.pdf.prawn +++ b/app/views/admin/registrations/show.pdf.prawn @@ -23,7 +23,7 @@ prawn_document(:force_download=>true, :filename => @pdf_filename) do |pdf| row << " " end - if registration.attending_social_events_with_partner.to_s + if registration.attending_with_partner.to_s row << "X" else row << " " diff --git a/app/views/conference_registration/register.html.haml b/app/views/conference_registration/register.html.haml index 4f78db30..3a705267 100644 --- a/app/views/conference_registration/register.html.haml +++ b/app/views/conference_registration/register.html.haml @@ -15,7 +15,7 @@ = f.fields_for :person do = f.inputs :public_name, :for => :person = f.input :attending_social_events, :label => false - = f.input :attending_social_events_with_partner, :label => false + = f.input :attending_with_partner, :label => false = f.input :using_affiliated_lodging, :label => false = f.input :handicapped_access_required, :label => false = f.input :arrival, :as => :string, :input_html => {:value => (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), :id => "conference-reg-start-datepicker", :readonly => "readonly" } diff --git a/db/migrate/20130206192339_rename_attending_social_events_with_partner.rb b/db/migrate/20130206192339_rename_attending_social_events_with_partner.rb new file mode 100644 index 00000000..bb9dc5ad --- /dev/null +++ b/db/migrate/20130206192339_rename_attending_social_events_with_partner.rb @@ -0,0 +1,8 @@ +class RenameAttendingSocialEventsWithPartner < ActiveRecord::Migration + def up + rename_column :registrations, :attending_social_events_with_partner, :attending_with_partner + end + + def down + end +end