Permalink
Browse files

renamed logo_image_url -> logo_url

  • Loading branch information...
1 parent 729f993 commit 0faa6173b744b6dd0ac421b8a2259bb9d9f62b10 @sferik sferik committed Oct 15, 2009
@@ -60,7 +60,7 @@ def load_data
division = MerbAdmin::AbstractModel.new("Division").create(:name => mlb_team.division, :league => league)
end
unless team = MerbAdmin::AbstractModel.new("Team").first(:conditions => ["name = ?", mlb_team.name])
- team = MerbAdmin::AbstractModel.new("Team").create(:name => mlb_team.name, :logo_image_url => mlb_team.logo_url, :manager => mlb_team.manager, :ballpark => mlb_team.ballpark, :mascot => mlb_team.mascot, :founded => mlb_team.founded, :wins => mlb_team.wins, :losses => mlb_team.losses, :win_percentage => ("%.3f" % (mlb_team.wins.to_f / (mlb_team.wins + mlb_team.losses))).to_f, :division => division, :league => league)
+ team = MerbAdmin::AbstractModel.new("Team").create(:name => mlb_team.name, :logo_url => mlb_team.logo_url, :manager => mlb_team.manager, :ballpark => mlb_team.ballpark, :mascot => mlb_team.mascot, :founded => mlb_team.founded, :wins => mlb_team.wins, :losses => mlb_team.losses, :win_percentage => ("%.3f" % (mlb_team.wins.to_f / (mlb_team.wins + mlb_team.losses))).to_f, :division => division, :league => league)
end
mlb_team.players.each do |player|
MerbAdmin::AbstractModel.new("Player").create(:name => player.name, :number => player.number, :position => player.position, :team => team)
@@ -5,7 +5,7 @@ def self.up
t.integer :league_id
t.integer :division_id
t.string :name, :limit => 50, :null => false
- t.string :logo_image_url, :limit => 255
+ t.string :logo_url, :limit => 255
t.string :manager, :limit => 100, :null => false
t.string :ballpark, :limit => 100
t.string :mascot, :limit => 100
@@ -7,7 +7,7 @@ class Team
property :league_id, Integer, :nullable => false, :index => true
property :division_id, Integer, :nullable => false, :index => true
property :name, String, :nullable => false, :index => true
- property :logo_image_url, String, :length => 255
+ property :logo_url, String, :length => 255
property :manager, String, :length => 100, :nullable => false, :index => true
property :ballpark, String, :length => 100, :index => true
property :mascot, String, :length => 100, :index => true

0 comments on commit 0faa617

Please sign in to comment.