2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-12-23 11:34:22 +01:00
|
|
|
class NullZone
|
|
|
|
include ActiveModel::Model
|
2024-01-16 18:45:01 +01:00
|
|
|
ReflectionAssociation = Struct.new(:class_name)
|
2021-12-23 11:34:22 +01:00
|
|
|
|
|
|
|
def procedures
|
|
|
|
Procedure.where(zone: nil).where.not(published_at: nil).order(published_at: :desc)
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.reflect_on_association(association)
|
2024-01-16 18:45:01 +01:00
|
|
|
ReflectionAssociation.new("Procedure") if association == :procedures
|
2021-12-23 11:34:22 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def label
|
|
|
|
"non renseignée"
|
|
|
|
end
|
|
|
|
|
|
|
|
def id
|
|
|
|
-1
|
|
|
|
end
|
|
|
|
|
|
|
|
def acronym
|
|
|
|
"NA"
|
|
|
|
end
|
|
|
|
|
|
|
|
def created_at
|
|
|
|
"NA"
|
|
|
|
end
|
|
|
|
|
|
|
|
def updated_at
|
|
|
|
"NA"
|
|
|
|
end
|
|
|
|
end
|