Module: Sipity::Commands::CollaboratorCommands

Defined in:
app/repositories/sipity/commands/collaborator_commands.rb

Overview

Commands

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_collaborators_for_sip!(sip:, collaborators:) ⇒ Object

REVIEW: Consider moving these into the SipCommands


9
10
11
12
13
14
# File 'app/repositories/sipity/commands/collaborator_commands.rb', line 9

def create_collaborators_for_sip!(sip:, collaborators:)
  collaborators.each do |collaborator|
    collaborator.sip = sip
    collaborator.save!
  end
end

Instance Method Details

#create_collaborators_for_sip!(sip:, collaborators:) ⇒ Object (private)

REVIEW: Consider moving these into the SipCommands


9
10
11
12
13
14
# File 'app/repositories/sipity/commands/collaborator_commands.rb', line 9

def create_collaborators_for_sip!(sip:, collaborators:)
  collaborators.each do |collaborator|
    collaborator.sip = sip
    collaborator.save!
  end
end