This rule was added in rubocop 1.79. We were inconsistent about it, so we're adding it to get more consistency.
36 lines
705 B
Ruby
36 lines
705 B
Ruby
class SDGManagement::Relations::SearchComponent < ApplicationComponent
|
|
include SDG::OptionsForSelect
|
|
|
|
attr_reader :label
|
|
|
|
def initialize(label:)
|
|
@label = label
|
|
end
|
|
|
|
private
|
|
|
|
def goal_label
|
|
t("admin.shared.search.advanced_filters.sdg_goals.label")
|
|
end
|
|
|
|
def goal_blank_option
|
|
t("admin.shared.search.advanced_filters.sdg_goals.all")
|
|
end
|
|
|
|
def target_label
|
|
t("admin.shared.search.advanced_filters.sdg_targets.label")
|
|
end
|
|
|
|
def target_blank_option
|
|
t("admin.shared.search.advanced_filters.sdg_targets.all")
|
|
end
|
|
|
|
def goal_options
|
|
super(params[:goal_code])
|
|
end
|
|
|
|
def target_options
|
|
super(params[:target_code])
|
|
end
|
|
end
|