perf(null-zone): replace open struct by struct
This commit is contained in:
parent
461e311d3d
commit
fa74cdb4c7
1 changed files with 2 additions and 1 deletions
|
@ -1,12 +1,13 @@
|
|||
class NullZone
|
||||
include ActiveModel::Model
|
||||
ReflectionAssociation = Struct.new(:class_name)
|
||||
|
||||
def procedures
|
||||
Procedure.where(zone: nil).where.not(published_at: nil).order(published_at: :desc)
|
||||
end
|
||||
|
||||
def self.reflect_on_association(association)
|
||||
OpenStruct.new(class_name: "Procedure") if association == :procedures
|
||||
ReflectionAssociation.new("Procedure") if association == :procedures
|
||||
end
|
||||
|
||||
def label
|
||||
|
|
Loading…
Reference in a new issue