Simplify code
This commit is contained in:
parent
864bb38d8a
commit
55419b92a8
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -12,6 +12,6 @@ class Champs::DecimalNumberChamp < Champ
|
|||
private
|
||||
|
||||
def processed_value
|
||||
value.present? ? value.to_f : nil
|
||||
value&.to_f
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,6 @@ class Champs::IntegerNumberChamp < Champ
|
|||
private
|
||||
|
||||
def processed_value
|
||||
value.present? ? value.to_i : nil
|
||||
value&.to_i
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class Champs::MultipleDropDownListChamp < Champ
|
|||
end
|
||||
|
||||
def to_s
|
||||
value.present? ? selected_options.join(', ') : ''
|
||||
selected_options.join(', ')
|
||||
end
|
||||
|
||||
def for_export
|
||||
|
|
Loading…
Reference in a new issue