このコミットが含まれているのは:
2026-03-10 22:35:08 +09:00
コミット 474e0695ba
6個のファイルの変更72行の追加49行の削除
+11 -1
ファイルの表示
@@ -1,12 +1,22 @@
FactoryBot.define do
factory :tag do
transient do
name { nil }
end
category { :general }
post_count { 0 }
association :tag_name
after(:build) do |tag, evaluator|
tag.name = evaluator.name if evaluator.name.present?
end
trait :nico do
category { :nico }
tag_name { association(:tag_name, name: "nico:#{ SecureRandom.hex(4) }") }
transient do
name { "nico:#{ SecureRandom.hex(4) }" }
end
end
end
end