Sha256: 2ac92bca387d97906d01638466ac453609eaa64761fa86c7730d3389773ab0ee
Contents?: true
Size: 566 Bytes
Versions: 12
Compression:
Stored size: 566 Bytes
Contents
class SeedService class << self def seed(variant: :reset) service = SeedService.new service.call(variant: variant) end end def call(variant: :reset) reset if variant == :reset refresh if variant == :refresh create end private def reset # Person.delete_all # Post.delete_all # Project.delete_all end def refresh end def create # FactoryBot.create_list(:post, rand(10..20)) # FactoryBot.create_list(:person, rand(10..20)) # FactoryBot.create_list(:project, rand(10..20)) end end
Version data entries
12 entries across 5 versions & 1 rubygems