Rename DropDownList#selected_options_without_decorator
This commit is contained in:
parent
4b4eb6d53e
commit
c4b9a0b79e
3 changed files with 5 additions and 5 deletions
|
@ -2,7 +2,7 @@ class Champs::MultipleDropDownListChamp < Champ
|
|||
before_save :format_before_save
|
||||
|
||||
def search_terms
|
||||
drop_down_list.selected_options_without_decorator(self)
|
||||
drop_down_list.selected_options(self)
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -20,10 +20,10 @@ class Champs::MultipleDropDownListChamp < Champ
|
|||
end
|
||||
|
||||
def string_value
|
||||
drop_down_list.selected_options_without_decorator(self).join(', ')
|
||||
drop_down_list.selected_options(self).join(', ')
|
||||
end
|
||||
|
||||
def value_for_export
|
||||
drop_down_list.selected_options_without_decorator(self).join(', ')
|
||||
drop_down_list.selected_options(self).join(', ')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ class DropDownList < ApplicationRecord
|
|||
options.select { |v| (v =~ /^--.*--$/).present? }
|
||||
end
|
||||
|
||||
def selected_options_without_decorator(champ)
|
||||
def selected_options(champ)
|
||||
champ.value.blank? ? [] : multiple ? JSON.parse(champ.value) : [champ.value]
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue