cleanup: remove unused code

This commit is contained in:
Paul Chavard 2024-11-04 13:27:30 +01:00
parent 19e46ac619
commit 81eeff2474
No known key found for this signature in database
3 changed files with 0 additions and 29 deletions

View file

@ -56,14 +56,6 @@ class Champs::DropDownListChamp < Champ
options.include?(value)
end
def remove_option(options, touch = false)
if touch
update(value: nil)
else
update_column(:value, nil)
end
end
private
def value_is_in_options

View file

@ -47,14 +47,6 @@ class Champs::LinkedDropDownListChamp < Champ
options.include?(primary_value) || options.include?(secondary_value)
end
def remove_option(options, touch = false)
if touch
update(value: nil)
else
update_column(:value, nil)
end
end
private
def pack_value(primary, secondary)

View file

@ -33,15 +33,6 @@ class Champs::MultipleDropDownListChamp < Champ
(selected_options - options).size != selected_options.size
end
def remove_option(options, touch = false)
value = (selected_options - options).to_json
if touch
update(value:)
else
update_columns(value:)
end
end
def focusable_input_id
render_as_checkboxes? ? checkbox_id(drop_down_options.first) : input_id
end
@ -80,10 +71,6 @@ class Champs::MultipleDropDownListChamp < Champ
end
end
def render?
@champ.drop_down_options.any?
end
private
def values_are_in_options