Sha256: ddf505aecebce427b52864b2eb6200ff4387f7635aa523c1906d417e78f23ac9

Contents?: true

Size: 592 Bytes

Versions: 2

Compression:

Stored size: 592 Bytes

Contents

david = User.create(email: 'david@site.com', name: 'david', password: 'password', password_confirmation: 'password', role: :admin)
james = User.create(email: 'james@site.com', name: 'james', password: 'password', password_confirmation: 'password')
sally = User.create(email: 'sally@site.com', name: 'sally', password: 'password', password_confirmation: 'password', role: :moderator)

10.times do
  Post.create(
    title: "Post #{Faker::Lorem.words(number: rand(1..3)).join(' ')}",
    body: "#{Faker::Lorem.sentences(number: 8).join("<br />")}",
    views: 0,
    user: User.all.sample)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_app_generator-0.2.24 after_templates/addons/devise/db/seeds.rb
rails_app_generator-0.2.23 after_templates/addons/devise/db/seeds.rb