This rule was added in rubocop 1.79. We were inconsistent about it, so we're adding it to get more consistency.
27 lines
535 B
Ruby
27 lines
535 B
Ruby
class Admin::BudgetHeadings::FormComponent < ApplicationComponent
|
|
include TranslatableFormHelper
|
|
include GlobalizeHelper
|
|
|
|
attr_reader :heading, :path, :action
|
|
|
|
def initialize(heading, path:, action:)
|
|
@heading = heading
|
|
@path = path
|
|
@action = action
|
|
end
|
|
|
|
private
|
|
|
|
def budget
|
|
heading.budget
|
|
end
|
|
|
|
def single_heading?
|
|
helpers.respond_to?(:single_heading?) && helpers.single_heading?
|
|
end
|
|
|
|
def geozone_options
|
|
Geozone.all.map { |geozone| [geozone.name, geozone.id] }
|
|
end
|
|
end
|