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
|
Enabled: true
|
||||||
ConsiderPunctuation: true
|
ConsiderPunctuation: true
|
||||||
|
|
||||||
|
Layout/ArrayAlignment:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Layout/AssignmentIndentation:
|
Layout/AssignmentIndentation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
@@ -57,6 +60,10 @@ Layout/EndOfLine:
|
|||||||
Layout/ExtraSpacing:
|
Layout/ExtraSpacing:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Layout/FirstArrayElementIndentation:
|
||||||
|
Enabled: true
|
||||||
|
EnforcedStyle: consistent
|
||||||
|
|
||||||
Layout/HeredocIndentation:
|
Layout/HeredocIndentation:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
@@ -79,6 +86,9 @@ Layout/LineLength:
|
|||||||
Max: 110
|
Max: 110
|
||||||
Severity: refactor
|
Severity: refactor
|
||||||
|
|
||||||
|
Layout/MultilineArrayBraceLayout:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
Layout/MultilineBlockLayout:
|
Layout/MultilineBlockLayout:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,16 @@ class Shared::AdvancedSearchComponent < ApplicationComponent
|
|||||||
end
|
end
|
||||||
|
|
||||||
def date_range_options
|
def date_range_options
|
||||||
options_for_select([
|
options_for_select(
|
||||||
|
[
|
||||||
[t("shared.advanced_search.date_1"), 1],
|
[t("shared.advanced_search.date_1"), 1],
|
||||||
[t("shared.advanced_search.date_2"), 2],
|
[t("shared.advanced_search.date_2"), 2],
|
||||||
[t("shared.advanced_search.date_3"), 3],
|
[t("shared.advanced_search.date_3"), 3],
|
||||||
[t("shared.advanced_search.date_4"), 4],
|
[t("shared.advanced_search.date_4"), 4],
|
||||||
[t("shared.advanced_search.date_5"), "custom"]],
|
[t("shared.advanced_search.date_5"), "custom"]
|
||||||
selected_date_range)
|
],
|
||||||
|
selected_date_range
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def selected_date_range
|
def selected_date_range
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ class Admin::BudgetsController < Admin::BaseController
|
|||||||
|
|
||||||
def allowed_params
|
def allowed_params
|
||||||
descriptions = Budget::Phase::PHASE_KINDS.map { |p| "description_#{p}" }.map(&:to_sym)
|
descriptions = Budget::Phase::PHASE_KINDS.map { |p| "description_#{p}" }.map(&:to_sym)
|
||||||
valid_attributes = [:phase,
|
valid_attributes = [
|
||||||
|
:phase,
|
||||||
:currency_symbol,
|
:currency_symbol,
|
||||||
:voting_style,
|
:voting_style,
|
||||||
:hide_money,
|
:hide_money,
|
||||||
|
|||||||
@@ -163,8 +163,7 @@ module Statisticable
|
|||||||
[75, 79],
|
[75, 79],
|
||||||
[80, 84],
|
[80, 84],
|
||||||
[85, 89],
|
[85, 89],
|
||||||
[90, 300]
|
[90, 300]]
|
||||||
]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def participants_between_ages(from, to)
|
def participants_between_ages(from, to)
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ module Consul
|
|||||||
"uk-UA",
|
"uk-UA",
|
||||||
"val",
|
"val",
|
||||||
"zh-CN",
|
"zh-CN",
|
||||||
"zh-TW"]
|
"zh-TW"
|
||||||
|
]
|
||||||
config.i18n.available_locales = available_locales
|
config.i18n.available_locales = available_locales
|
||||||
config.i18n.fallbacks = [I18n.default_locale, {
|
config.i18n.fallbacks = [I18n.default_locale, {
|
||||||
"ca" => "es",
|
"ca" => "es",
|
||||||
|
|||||||
Reference in New Issue
Block a user