diff --git a/app/models/pbs/person.rb b/app/models/pbs/person.rb index 860759460..d253de93a 100644 --- a/app/models/pbs/person.rb +++ b/app/models/pbs/person.rb @@ -73,7 +73,7 @@ module Pbs::Person alias_method_chain :full_name, :title - after_initialize :defaults, unless: :persisted? + # after_initialize :defaults, unless: :persisted? # ":if => :new_record?" is equivalent in this context end diff --git a/db/migrate/20131211121712_add_pfadi_attributes.rb b/db/migrate/20131211121712_add_pfadi_attributes.rb index 9a6bcec1d..d0bdd9741 100644 --- a/db/migrate/20131211121712_add_pfadi_attributes.rb +++ b/db/migrate/20131211121712_add_pfadi_attributes.rb @@ -7,13 +7,13 @@ class AddPfadiAttributes < ActiveRecord::Migration def change - add_column :people, :salutation, :string + add_column :people, :salutation, :string, default: "lieber_pfadiname" add_column :people, :title, :string add_column :people, :grade_of_school, :integer add_column :people, :entry_date, :date add_column :people, :leaving_date, :date add_column :people, :j_s_number, :string - add_column :people, :correspondence_language, :string, limit: 5 + add_column :people, :correspondence_language, :string, limit: 5, default: "de" add_column :people, :brother_and_sisters, :boolean, default: false, null: false add_column :groups, :pta, :boolean, default: false, null: false