Module: Sipity::Queries::CitationQueries

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

Overview

Queries

Instance Method Summary collapse

Instance Method Details

#build_assign_a_citation_form(attributes = {}) ⇒ Object


11
12
13
# File 'app/repositories/sipity/queries/citation_queries.rb', line 11

def build_assign_a_citation_form(attributes = {})
  Forms::AssignACitationForm.new(attributes)
end

#citation_already_assigned?(sip) ⇒ Boolean

Returns:

  • (Boolean)

5
6
7
8
9
# File 'app/repositories/sipity/queries/citation_queries.rb', line 5

def citation_already_assigned?(sip)
  AdditionalAttributeQueries.sip_attribute_values_for(
    sip: sip, key: Models::AdditionalAttribute::CITATION_PREDICATE_NAME
  ).any?
end