Skip to content

Instantly share code, notes, and snippets.

@thecristen
thecristen / fixtures.rake
Last active August 29, 2015 14:27 — forked from ZachBeta/fixtures.rake
Rake task to create fixtures from test database in Rails 3.1
#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|
@thecristen
thecristen / README.md
Last active August 29, 2015 14:05 — forked from bycoffe/README.md

This is forked from bycoffe!!! Please see there for more instruction.

I am going to modify this to show cool (but made up) data.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.