I\'m using Rails 3.0.3 and have data for my \"categories\" table already in the database, but want to create a seed file from it. Is there any rake task that will generate t
Not sure about any existing rake tasks, but you can try running something like this in the rails console & paste the results into your seeds.rb file
(warning: dirty & untested)
c = Category.all
c.each do |cat|
puts "Category.create(:name => '#{cat.name}')"
end
Adjust for any additional fields you may have.
Hope this helps.