Class: NextSges::Student

Inherits:
ApplicationRecord show all
Defined in:
app/models/next_sges/student.rb

Constant Summary collapse

INITIAL_LETTER =
"A"

Constants inherited from ApplicationRecord

ApplicationRecord::CELL_REGEX, ApplicationRecord::DEFAULT_IDENTIFICATION_ENUM, ApplicationRecord::DEFAULT_STATUS_ENUM, ApplicationRecord::MAIL_REGEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationRecord

#create_number, #create_number!, map_for_filter, map_for_select

Instance Attribute Details

#aux_types_idsObject

Returns the value of attribute aux_types_ids.



16
17
18
# File 'app/models/next_sges/student.rb', line 16

def aux_types_ids
  @aux_types_ids
end

Instance Method Details

#first_and_last_nameObject



19
20
21
# File 'app/models/next_sges/student.rb', line 19

def first_and_last_name
  "#{first_name} #{last_name}"
end

#full_nameObject



23
24
25
# File 'app/models/next_sges/student.rb', line 23

def full_name
  "#{first_name} #{middle_name} #{last_name}"
end

#name_and_numberObject



27
28
29
# File 'app/models/next_sges/student.rb', line 27

def name_and_number
  "#{number} - #{first_and_last_name}"
end

#not_associated_responsiblesObject



31
32
33
# File 'app/models/next_sges/student.rb', line 31

def not_associated_responsibles
  ::Responsible.where(school_id: school_id).where.not(id: responsibles.ids)
end