Этот коммит содержится в:
Mattia Roccoberton
2025-04-04 08:14:53 +02:00
родитель bc140179f2
Коммит 97dbabce09
20 изменённых файлов: 156 добавлений и 183 удалений

Просмотреть файл

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2018_06_07_053739) do
ActiveRecord::Schema.define(version: 2018_06_07_053739) do
create_table "active_admin_comments", force: :cascade do |t|
t.string "namespace"
t.text "body"

Просмотреть файл

@@ -1,13 +1,9 @@
# frozen_string_literal: true
puts 'Seeds:'
puts 'Tags...'
(11..16).each do |i|
Tag.find_or_create_by!(name: "Tag #{i}")
end
puts 'Authors...'
(11..20).each do |i|
age = 21 + 3 * (i - 10)
attrs = { name: "Author #{i}", age: age, email: "some@email#{i}.com" }
@@ -16,7 +12,6 @@ puts 'Authors...'
end
end
puts 'Posts...'
authors = Author.pluck(:id)
tags = Tag.where.not(name: 'A test tag').pluck(:id)
(11..40).each do |i|
@@ -38,4 +33,4 @@ end
Author.find_or_create_by!(name: 'A test author', email: 'aaa@bbb.ccc', age: 30)
Tag.find_or_create_by!(name: 'A test tag')
puts 'done.'
puts '> Seeds: done.'