Simplify code

This commit is contained in:
gregoirenovel 2018-12-28 18:12:12 +01:00
parent 864bb38d8a
commit 55419b92a8
4 changed files with 4 additions and 4 deletions

View file

@ -90,6 +90,6 @@ class Champs::CarteChamp < Champ
end
def for_api
geo_json.present? ? geo_json.to_json : nil
geo_json&.to_json
end
end

View file

@ -12,6 +12,6 @@ class Champs::DecimalNumberChamp < Champ
private
def processed_value
value.present? ? value.to_f : nil
value&.to_f
end
end

View file

@ -12,6 +12,6 @@ class Champs::IntegerNumberChamp < Champ
private
def processed_value
value.present? ? value.to_i : nil
value&.to_i
end
end

View file

@ -10,7 +10,7 @@ class Champs::MultipleDropDownListChamp < Champ
end
def to_s
value.present? ? selected_options.join(', ') : ''
selected_options.join(', ')
end
def for_export