Browse Source

fix if in seeds.rb

denney-disable-on-select
Jason Denney 12 years ago
parent
commit
0d5b93b0b1
  1. 2
      db/seeds.rb

2
db/seeds.rb

@ -13,7 +13,7 @@ Dir.glob(File.join(Rails.root, 'db', 'seed', 'fixtures', '**', '*.{yml,csv}')).e
end end
#Load bike brands and models from sql #Load bike brands and models from sql
if if BikeBrand.all.empty? and BikeModel.all.empty?
sql_path = File.join(Rails.root, 'db', 'seed', 'sql', 'bike_brands_and_models.sql') sql_path = File.join(Rails.root, 'db', 'seed', 'sql', 'bike_brands_and_models.sql')
system "sqlite3 db/development.sqlite3 < #{sql_path}" if Rails.env.development? system "sqlite3 db/development.sqlite3 < #{sql_path}" if Rails.env.development?
end end

Loading…
Cancel
Save