Class: NextSges::Parent

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

Constant Summary collapse

INITIAL_LETTER =
"E"

Constants inherited from ApplicationRecord

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

Instance Method Summary collapse

Methods inherited from ApplicationRecord

#create_number, #create_number!, map_for_filter, map_for_select

Instance Method Details

#first_and_last_nameObject



10
11
12
# File 'app/models/next_sges/parent.rb', line 10

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

#full_nameObject



14
15
16
# File 'app/models/next_sges/parent.rb', line 14

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

#map_for_filter(method_name = :first_and_last_name) ⇒ Object



22
23
24
# File 'app/models/next_sges/parent.rb', line 22

def map_for_filter(method_name = :first_and_last_name)
  super(:first_and_last_name)
end

#map_for_select(method_name = :first_and_last_name) ⇒ Object



18
19
20
# File 'app/models/next_sges/parent.rb', line 18

def map_for_select(method_name = :first_and_last_name)
  super(:first_and_last_name)
end

#name_and_numberObject



30
31
32
# File 'app/models/next_sges/parent.rb', line 30

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

#students_numberObject



26
27
28
# File 'app/models/next_sges/parent.rb', line 26

def students_number
  students.size
end