cleanup: remove unused code
This commit is contained in:
parent
19e46ac619
commit
81eeff2474
3 changed files with 0 additions and 29 deletions
|
@ -56,14 +56,6 @@ class Champs::DropDownListChamp < Champ
|
||||||
options.include?(value)
|
options.include?(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_option(options, touch = false)
|
|
||||||
if touch
|
|
||||||
update(value: nil)
|
|
||||||
else
|
|
||||||
update_column(:value, nil)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def value_is_in_options
|
def value_is_in_options
|
||||||
|
|
|
@ -47,14 +47,6 @@ class Champs::LinkedDropDownListChamp < Champ
|
||||||
options.include?(primary_value) || options.include?(secondary_value)
|
options.include?(primary_value) || options.include?(secondary_value)
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_option(options, touch = false)
|
|
||||||
if touch
|
|
||||||
update(value: nil)
|
|
||||||
else
|
|
||||||
update_column(:value, nil)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def pack_value(primary, secondary)
|
def pack_value(primary, secondary)
|
||||||
|
|
|
@ -33,15 +33,6 @@ class Champs::MultipleDropDownListChamp < Champ
|
||||||
(selected_options - options).size != selected_options.size
|
(selected_options - options).size != selected_options.size
|
||||||
end
|
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
|
def focusable_input_id
|
||||||
render_as_checkboxes? ? checkbox_id(drop_down_options.first) : input_id
|
render_as_checkboxes? ? checkbox_id(drop_down_options.first) : input_id
|
||||||
end
|
end
|
||||||
|
@ -80,10 +71,6 @@ class Champs::MultipleDropDownListChamp < Champ
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def render?
|
|
||||||
@champ.drop_down_options.any?
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def values_are_in_options
|
def values_are_in_options
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue