I’m not exactly sure what this is yet, but the transparent png trick is pretty dang cool. Make sure you resize your browser window once the page is loaded, then watch the vines.
Neat-o Transparent PNG Trick February 22nd, 2008 at 6:47pm by Chris
A Rake Task for Faker February 2nd, 2008 at 11:16pm by Chris
Need to insert some fake data in your development database? Grab the Faker gem and drop this into lib/tasks/fake_data.rb. Customize it for your model(s) and execute with rake db:development:fake_data.
namespace :db do namespace :development do desc "Create records in the development database." task :fake_data => :environment do require 'faker' 100.times do c = Client.create( :first_name => Faker::Name.first_name, :last_name => Faker::Name.last_name, :middle_initial => ("A".."Z").to_a.rand, :ss_number => 99999999 + rand(999999999 - 99999999), :date_of_birth => Time.now - (rand(12000)).days) end end end end
I’m sure there’s more optimization to be done, but it works for me!
UPDATE: I added a few extra lines for data outside of faker.
