sanger/limber

View on GitHub
app/models/concerns/presenters/statemachine/state_allows_single_child_creation.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Presenters::Statemachine
  # Supports creation of a single child asset in this state
  module StateAllowsSingleChildCreation
    extend ActiveSupport::Concern
    included do
      def control_additional_creation
        yield if child_assets.blank?
      end
    end
  end
end