Skip to content

Instantly share code, notes, and snippets.

#put in lib/tasks/fixtures.rake
namespace :db do
namespace :fixtures do
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
task :dump => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_migrations"]
ActiveRecord::Base.establish_connection(:development)
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
@mikepmunroe
mikepmunroe / about.md
Created August 9, 2011 16:55 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer