perf(champ): check condition.present? without json deserializationl, -6ms

This commit is contained in:
simon lehericey 2022-10-13 12:30:45 +02:00 committed by LeSim
parent 73b4ee64e6
commit f8ee6386b9

View file

@ -198,7 +198,7 @@ class Champ < ApplicationRecord
end
def conditional?
type_de_champ.condition.present?
type_de_champ.read_attribute_before_type_cast('condition').present?
end
def visible?