Permalink
Browse files

add final

  • Loading branch information...
1 parent 4057243 commit 65ae3358e40c1cfd5c0414bb2d9c6991c446e2b5 @geraldb geraldb committed Jun 29, 2012
Showing with 32 additions and 0 deletions.
  1. +23 −0 db/seeds/euro2.rb
  2. +9 −0 lib/tasks/load_euro.rake
View
@@ -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' )
View
@@ -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.