Add and apply rules for multi-line arrays
We were already applying these rules in most cases. Note we aren't enabling the `MultilineArrayLineBreaks` rule because we've got places with many elements whire it isn't clear whether having one element per line would make the code more readable.
This commit is contained in:
10
.rubocop.yml
10
.rubocop.yml
@@ -18,6 +18,9 @@ Bundler/OrderedGems:
|
||||
Enabled: true
|
||||
ConsiderPunctuation: true
|
||||
|
||||
Layout/ArrayAlignment:
|
||||
Enabled: true
|
||||
|
||||
Layout/AssignmentIndentation:
|
||||
Enabled: true
|
||||
|
||||
@@ -57,6 +60,10 @@ Layout/EndOfLine:
|
||||
Layout/ExtraSpacing:
|
||||
Enabled: true
|
||||
|
||||
Layout/FirstArrayElementIndentation:
|
||||
Enabled: true
|
||||
EnforcedStyle: consistent
|
||||
|
||||
Layout/HeredocIndentation:
|
||||
Enabled: true
|
||||
|
||||
@@ -79,6 +86,9 @@ Layout/LineLength:
|
||||
Max: 110
|
||||
Severity: refactor
|
||||
|
||||
Layout/MultilineArrayBraceLayout:
|
||||
Enabled: true
|
||||
|
||||
Layout/MultilineBlockLayout:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -8,13 +8,16 @@ class Shared::AdvancedSearchComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def date_range_options
|
||||
options_for_select([
|
||||
options_for_select(
|
||||
[
|
||||
[t("shared.advanced_search.date_1"), 1],
|
||||
[t("shared.advanced_search.date_2"), 2],
|
||||
[t("shared.advanced_search.date_3"), 3],
|
||||
[t("shared.advanced_search.date_4"), 4],
|
||||
[t("shared.advanced_search.date_5"), "custom"]],
|
||||
selected_date_range)
|
||||
[t("shared.advanced_search.date_5"), "custom"]
|
||||
],
|
||||
selected_date_range
|
||||
)
|
||||
end
|
||||
|
||||
def selected_date_range
|
||||
|
||||
@@ -60,7 +60,8 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
|
||||
def allowed_params
|
||||
descriptions = Budget::Phase::PHASE_KINDS.map { |p| "description_#{p}" }.map(&:to_sym)
|
||||
valid_attributes = [:phase,
|
||||
valid_attributes = [
|
||||
:phase,
|
||||
:currency_symbol,
|
||||
:voting_style,
|
||||
:hide_money,
|
||||
|
||||
@@ -163,8 +163,7 @@ module Statisticable
|
||||
[75, 79],
|
||||
[80, 84],
|
||||
[85, 89],
|
||||
[90, 300]
|
||||
]
|
||||
[90, 300]]
|
||||
end
|
||||
|
||||
def participants_between_ages(from, to)
|
||||
|
||||
@@ -97,7 +97,8 @@ module Consul
|
||||
"uk-UA",
|
||||
"val",
|
||||
"zh-CN",
|
||||
"zh-TW"]
|
||||
"zh-TW"
|
||||
]
|
||||
config.i18n.available_locales = available_locales
|
||||
config.i18n.fallbacks = [I18n.default_locale, {
|
||||
"ca" => "es",
|
||||
|
||||
Reference in New Issue
Block a user