Sha256: 23b7fd8211cc7b87d86dfd822d6df37acea9193b4f3751b0bdf316ec8649bb7f
Contents?: true
Size: 547 Bytes
Versions: 12
Compression:
Stored size: 547 Bytes
Contents
# frozen_string_literal: true # @see https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#custom-strategies # @example # let(:resource) { FactoryBot.valkyrie_create(:hyrax_work) } class ValkyrieCreateStrategy def result(evaluation) evaluation.notify(:after_build, evaluation.object) evaluation.notify(:before_create, evaluation.object) result = persister.save(resource: evaluation.object) evaluation.notify(:after_create, result) result end private def persister Hyrax.persister end end
Version data entries
12 entries across 12 versions & 1 rubygems