@@ -7,7 +7,7 task :extract_fixtures => :environment do | |||
|
7 | 7 | ActiveRecord::Base.establish_connection |
|
8 | 8 | (ActiveRecord::Base.connection.tables - skip_tables).each do |table_name| |
|
9 | 9 | i = "000" |
|
10 |
File.open("#{R |
|
|
10 | File.open("#{Rails.root}/#{table_name}.yml", 'w' ) do |file| | |
|
11 | 11 | data = ActiveRecord::Base.connection.select_all(sql % table_name) |
|
12 | 12 | file.write data.inject({}) { |hash, record| |
|
13 | 13 | # cast extracted values |
@@ -19,4 +19,5 task :extract_fixtures => :environment do | |||
|
19 | 19 | }.to_yaml |
|
20 | 20 | end |
|
21 | 21 | end |
|
22 | end | |
|
22 | end | |
|
23 |
General Comments 0
You need to be logged in to leave comments.
Login now