Sha256: fb8ba4b01d6c1bffb963043e74b19796b36e3ab99f20859e0143dcfa30292e8d

Contents?: true

Size: 821 Bytes

Versions: 4

Compression:

Stored size: 821 Bytes

Contents

namespace :db do
  
  desc "Erase and fill database"
  task :populate => :environment do
    require 'faker'
    [Contact].each(&:delete_all)
    10.times do
      contact = Contact.create(:name => Faker::Name.name,
                            :email => (rand(10000).to_s + Faker::Internet.email),
                            :message => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
      )
    end
     
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
i0n_rails3_generators-0.2.13 lib/generators/i0n/authentication/templates/lib/tasks/populate.rake
i0n_rails3_generators-0.2.12 lib/generators/i0n/authentication/templates/lib/tasks/populate.rake
i0n_rails3_generators-0.2.11 lib/generators/i0n/authentication/templates/lib/tasks/populate.rake
i0n_rails3_generators-0.2.10 lib/generators/i0n/authentication/templates/lib/tasks/populate.rake