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

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_nameObject



38
39
40
# File 'app/models/next_sges/student.rb', line 38

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

#full_nameObject



42
43
44
# File 'app/models/next_sges/student.rb', line 42

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

#name_and_numberObject



46
47
48
# File 'app/models/next_sges/student.rb', line 46

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

#not_associated_responsiblesObject



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