Skip to content

Commit

Permalink
DefaultValuesFixed
Browse files Browse the repository at this point in the history
  • Loading branch information
g1raffi committed Apr 20, 2015
1 parent a37fb16 commit 5d12d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/pbs/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20131211121712_add_pfadi_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

2 comments on commit 5d12d16

@g1raffi
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, commit shouldn't be on develop branch. But should anyways work just fine

@hairmare
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snd1 No worries, as long as you don't touch master 😉

Please sign in to comment.