9 lines
287 B
Ruby
9 lines
287 B
Ruby
class IndividualSerializer < ActiveModel::Serializer
|
|
attribute :gender, key: :civilite
|
|
attributes :nom, :prenom
|
|
attribute :birthdate, key: :date_naissance, if: :include_birthdate?
|
|
|
|
def include_birthdate?
|
|
object&.dossier&.groupe_instructeur&.procedure&.ask_birthday
|
|
end
|
|
end
|