Update champ_decorator.rb

This commit is contained in:
Mathieu Magnin 2017-03-20 12:14:16 +01:00 committed by GitHub
parent ce343aac96
commit 75007825f8

View file

@ -3,7 +3,7 @@ class ChampDecorator < Draper::Decorator
def value
return object.value == 'on' ? 'Oui' : 'Non' if type_champ == 'checkbox'
return JSON.parse(object.value).join(', ') if type_champ == 'multiple_drop_down_list' && !object.value.blank?
return JSON.parse(object.value).join(', ') if type_champ == 'multiple_drop_down_list' && object.value.present?
object.value
end