Module: Sipity::Queries::CollaboratorQueries

Defined in:
app/repositories/sipity/queries/collaborator_queries.rb

Overview

Queries Queries

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.sip_collaborator_names_for(options = {}) ⇒ Object


12
13
14
# File 'app/repositories/sipity/queries/collaborator_queries.rb', line 12

def sip_collaborator_names_for(options = {})
  sip_collaborators_for(options).pluck(:name)
end

.sip_collaborators_for(options = {}) ⇒ Object


6
7
8
# File 'app/repositories/sipity/queries/collaborator_queries.rb', line 6

def sip_collaborators_for(options = {})
  Models::Collaborator.includes(:sip).where(options.slice(:sip, :role))
end

Instance Method Details

#sip_collaborator_names_for(options = {}) ⇒ Object


12
13
14
# File 'app/repositories/sipity/queries/collaborator_queries.rb', line 12

def sip_collaborator_names_for(options = {})
  sip_collaborators_for(options).pluck(:name)
end

#sip_collaborators_for(options = {}) ⇒ Object


6
7
8
# File 'app/repositories/sipity/queries/collaborator_queries.rb', line 6

def sip_collaborators_for(options = {})
  Models::Collaborator.includes(:sip).where(options.slice(:sip, :role))
end