Here's a quick snippet to dump the data out to a file for easy transport:
model = User #replace with your model name
f = File.new("/path/to/data/#{model.to_s}.yaml", "w+"); f.puts model.find(:all).to_yaml; f.close
model = User #replace with your model name
f = File.new("/path/to/data/#{model.to_s}.yaml", "w+"); f.puts model.find(:all).to_yaml; f.close
No comments:
Post a Comment