Skip to content

Commit

Permalink
add final
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Jun 29, 2012
1 parent 4057243 commit 65ae335
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions db/seeds/euro2.rb
@@ -0,0 +1,23 @@
# encoding: utf-8

### add viertelfinale games

# note: timezone for games (play_at) is *always* CET (central european time)

puts "*** loading seed data in seeds/euro2.rb"

esp = Team.find_by_key!( 'spain' )
ita = Team.find_by_key!( 'italy' )


games_euro2 = [
[ 31, esp, [], ita, Time.cet('2012-07-01 20:45') ]]

euro = Event.find_by_key!('euro')
euro2 = Round.find_by_event_id_and_pos_and_fix!( euro.id, 6, false )

Game.create_knockouts_from_ary!( games_euro2, euro2 )


## todo: use new version constant for app module e.g. Wettpool::VERSION ??
Prop.create!( :key => 'db.seeds.euro.2.version', :value => '1' )
9 changes: 9 additions & 0 deletions lib/tasks/load_euro.rake
Expand Up @@ -15,4 +15,13 @@ task :load_euro4 => [:environment] do |t|
require "#{Rails.root}/db/seeds/#{seed}.rb"
end

end

desc "wettpool: load euro2 seed data for flex euro pools"
task :load_euro2 => [:environment] do |t|

['euro2'].each do |seed|
require "#{Rails.root}/db/seeds/#{seed}.rb"
end

end

0 comments on commit 65ae335

Please sign in to comment.