Class: Unico::CreditorRepresentative

Inherits:
Model
  • Object
show all
Defined in:
app/models/unico/creditor_representative.rb

Direct Known Subclasses

CreditorRepresentative

Class Method Summary collapse

Class Method Details

.term(q) ⇒ Object



13
14
15
16
17
18
# File 'app/models/unico/creditor_representative.rb', line 13

def self.term(q)
  person_table = ::Person.arel_table

  joins(:representative_person)
    .where(person_table[:name].matches("#{q}%"))
end