Class: NextSges::Student
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ApplicationRecord
- NextSges::Student
- 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
-
#aux_types_ids ⇒ Object
def self.student_cycle(l) # where(‘extract(year from updated_at) = ?’, DateTime.now.year) end.
Instance Method Summary collapse
- #first_and_last_name ⇒ Object
- #full_name ⇒ Object
- #name_and_number ⇒ Object
- #not_associated_responsibles ⇒ Object
Methods inherited from ApplicationRecord
#create_number, #create_number!, map_for_filter, map_for_select
Instance Attribute Details
#aux_types_ids ⇒ Object
def self.student_cycle(l)
# where('extract(year from updated_at) = ?', DateTime.now.year)
end
35 36 37 |
# File 'app/models/next_sges/student.rb', line 35 def aux_types_ids @aux_types_ids end |
Instance Method Details
#first_and_last_name ⇒ Object
38 39 40 |
# File 'app/models/next_sges/student.rb', line 38 def first_and_last_name "#{first_name} #{last_name}" end |
#full_name ⇒ Object
42 43 44 |
# File 'app/models/next_sges/student.rb', line 42 def full_name "#{first_name} #{middle_name} #{last_name}" end |
#name_and_number ⇒ Object
46 47 48 |
# File 'app/models/next_sges/student.rb', line 46 def name_and_number "#{number} - #{first_and_last_name}" end |
#not_associated_responsibles ⇒ Object
50 51 52 |
# File 'app/models/next_sges/student.rb', line 50 def not_associated_responsibles ::Responsible.where(school_id: school_id).where.not(id: responsibles.ids) end |