object.rb 200 B

12345
  1. FactoryBot.define do
  2. factory :'history/object', aliases: %i[history_object] do
  3. name { (ApplicationModel.descendants.select(&:any?).map(&:name) - History::Object.pluck(:name)).sample }
  4. end
  5. end