Skip to content

Commit

Permalink
fidelio seed, works only in pbs wagon. (Dominic, Peter)
Browse files Browse the repository at this point in the history
  • Loading branch information
koal-miner committed Apr 27, 2015
1 parent 5d12d16 commit 7d99513
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions db/seeds/development/1_people.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ def amount(role_type)
seeder.seed_all_roles

root = Group.root

# Seed Max Mustermann, Fidelio as Abteilungsleiter Pfadi Patria
patria = Group.find_by_name('Patria')
seeder.seed_developer('Max Mustermann', '[email protected]', patria, Group::Abteilung::Abteilungsleitung)
seeder.seed_role(Person.find_by_email('[email protected]'), patria, Group::Abteilung::Abteilungsleitung)

person = Person.find_by_email('[email protected]')
person.nickname = 'Fidelio'
person.save

devs.each do |name, email|
seeder.seed_developer(name, email, root, Group::Bund::MitarbeiterGs)
end

This comment has been minimized.

Copy link
@hairmare

hairmare Apr 27, 2015

Member

What's with these whitespace lines? Sorry for nitpicking but since you are changing a file in a fork I'd like them gone so they won't be in the way of any future upstream merges.


3 comments on commit 7d99513

@koal-miner
Copy link
Author

Choose a reason for hiding this comment

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

Unfortunatley we were not able to find out, how to do it in the patria wagon. We have tried it but the methods were not called, so there was no output.

@hairmare
Copy link
Member

Choose a reason for hiding this comment

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

Did you look into changing something in spec/spec_helper.rb? That file seems to have something to with it and its version in the pbs bundle does contain an awful lot of rails 1.4 changes. I'm ok with leaving it here if that doesn't pan out but need to now if you looked there.

@koal-miner
Copy link
Author

Choose a reason for hiding this comment

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

No, we haven't looked into spec_helper.rb. We're gonna check it and we will let you know then, if we were successful in moving it to patria or not. I'm also gonna clean the code then in db/seeds/development/1_people.rb

Please sign in to comment.