app/concepts/assignable/common_side_effects.rb
# create initial Assignment from system for the creating user
create initial Assignment from system for the creating user
create initial Assignment from system for the creating user
def create_new_assignment_if_assignable_should_be_reassigned!(
        _options, model:, current_user:, **
      )
        if assignable_twin(model).should_create_new_assignment?
          ::Assignment::CreateBySystem.(
            {}, assignable: model, last_acting_user: current_user
          ).success?
        else
          model.current_assignment.touch
          true
        end
      end
def create_new_assignment_if_assignable_should_be_reassigned! ( _options , model : , current_user : , ** ) if assignable_twin ( model ) . should_create_new_assignment? :: Assignment :: CreateBySystem . ( { } , assignable : model , last_acting_user : current_user ) . success? else model . current_assignment . touch true end end
create initial Assignment from system for the creating user
create initial Assignment from system for the creating user
# touch current_assignment (sets updated_at to current time)
_options
<not_specific>
model
<not_specific>
current_user
<not_specific>