Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit bbe0d9556b71c98d5a808a2463b74b8cb88e40f0 2 parents 1b516b7 + 08dc067
Mike Gunderloy authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tasks/populate.rake
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.