Permalink
Browse files

Merge pull request #1 from junaidali/patch-1

Updated RAILS_ROOT and RAILS_ENV as per newer Rails naming standards. Tes
  • Loading branch information...
2 parents 1b516b7 + 08dc067 commit bbe0d9556b71c98d5a808a2463b74b8cb88e40f0 @ffmike committed Oct 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 tasks/populate.rake
View
@@ -3,15 +3,15 @@ namespace :db do
desc "Loads initial database models for the current environment."
task :populate => :environment do
require File.join(File.dirname(__FILE__), '/../lib', 'create_or_update')
- Dir[File.join(RAILS_ROOT, 'db', 'populate', '*.rb')].sort.each do |fixture|
+ Dir[File.join(Rails.root, 'db', 'populate', '*.rb')].sort.each do |fixture|
load fixture
puts "Loaded #{fixture}"
end
- (Dir[File.join(RAILS_ROOT, 'db', 'populate', RAILS_ENV, '*.rb')] + Dir[File.join(RAILS_ROOT, 'db', 'populate', 'shared', '*.rb')]).sort{|x,y| File.basename(x) <=> File.basename(y)}.each do |fixture|
+ (Dir[File.join(Rails.root, 'db', 'populate', Rails.env, '*.rb')] + Dir[File.join(Rails.root, 'db', 'populate', 'shared', '*.rb')]).sort{|x,y| File.basename(x) <=> File.basename(y)}.each do |fixture|
load fixture
puts "Loaded #{fixture}"
end
- Dir[File.join(RAILS_ROOT, 'db', 'populate', 'after', '*.rb')].sort.each do |fixture|
+ Dir[File.join(Rails.root, 'db', 'populate', 'after', '*.rb')].sort.each do |fixture|
load fixture
puts "Loaded #{fixture}"
end

0 comments on commit bbe0d95

Please sign in to comment.