Apply PercentLiteralDelimiters rubocop rule

This commit is contained in:
Javi Martín
2019-06-18 02:09:10 +02:00
parent 17c36c6c6c
commit b5b07bccd3
49 changed files with 79 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
class Admin::ActivityController < Admin::BaseController
has_filters %w{all on_users on_proposals on_debates on_comments on_system_emails}
has_filters %w[all on_users on_proposals on_debates on_comments on_system_emails]
def show
@activity = Activity.for_render.send(@current_filter)

View File

@@ -1,7 +1,7 @@
class Admin::BannersController < Admin::BaseController
include Translatable
has_filters %w{all with_active with_inactive}, only: :index
has_filters %w[all with_active with_inactive], only: :index
before_action :banner_sections, only: [:edit, :new, :create, :update]

View File

@@ -4,7 +4,7 @@ class Admin::BudgetsController < Admin::BaseController
include FeatureFlags
feature_flag :budgets
has_filters %w{open finished}, only: :index
has_filters %w[open finished], only: :index
before_action :load_budget, except: [:index, :new, :create]
load_and_authorize_resource

View File

@@ -1,7 +1,7 @@
class Admin::HiddenBudgetInvestmentsController < Admin::BaseController
include FeatureFlags
has_filters %w{all with_confirmed_hide without_confirmed_hide}, only: :index
has_filters %w[all with_confirmed_hide without_confirmed_hide], only: :index
feature_flag :budgets

View File

@@ -1,5 +1,5 @@
class Admin::HiddenCommentsController < Admin::BaseController
has_filters %w{without_confirmed_hide all with_confirmed_hide}
has_filters %w[without_confirmed_hide all with_confirmed_hide]
before_action :load_comment, only: [:confirm_hide, :restore]

View File

@@ -3,7 +3,7 @@ class Admin::HiddenDebatesController < Admin::BaseController
feature_flag :debates
has_filters %w{without_confirmed_hide all with_confirmed_hide}, only: :index
has_filters %w[without_confirmed_hide all with_confirmed_hide], only: :index
before_action :load_debate, only: [:confirm_hide, :restore]

View File

@@ -1,5 +1,5 @@
class Admin::HiddenUsersController < Admin::BaseController
has_filters %w{without_confirmed_hide all with_confirmed_hide}, only: :index
has_filters %w[without_confirmed_hide all with_confirmed_hide], only: :index
before_action :load_user, only: [:confirm_hide, :restore]

View File

@@ -1,5 +1,5 @@
class Admin::OrganizationsController < Admin::BaseController
has_filters %w{pending all verified rejected}, only: :index
has_filters %w[pending all verified rejected], only: :index
load_and_authorize_resource except: :search

View File

@@ -1,6 +1,6 @@
class Admin::ProposalNotificationsController < Admin::BaseController
has_filters %w{without_confirmed_hide all with_confirmed_hide}, only: :index
has_filters %w[without_confirmed_hide all with_confirmed_hide], only: :index
before_action :load_proposal, only: [:confirm_hide, :restore]

View File

@@ -30,7 +30,7 @@ module Budgets
feature_flag :budgets
has_orders %w{most_voted newest oldest}, only: :show
has_orders %w[most_voted newest oldest], only: :show
has_orders ->(c) { c.instance_variable_get(:@budget).investments_orders }, only: :index
valid_filters = %w[not_unfeasible feasible unfeasible unselected selected winners]

View File

@@ -1,5 +1,5 @@
class CommunitiesController < ApplicationController
TOPIC_ORDERS = %w{newest most_commented oldest}.freeze
TOPIC_ORDERS = %w[newest most_commented oldest].freeze
before_action :set_order, :set_community, :load_topics, :load_participants
has_orders TOPIC_ORDERS

View File

@@ -14,7 +14,7 @@ class DebatesController < ApplicationController
invisible_captcha only: [:create, :update], honeypot: :subtitle
has_orders ->(c) { Debate.debates_orders(c.current_user) }, only: :index
has_orders %w{most_voted newest oldest}, only: :show
has_orders %w[most_voted newest oldest], only: :show
load_and_authorize_resource
helper_method :resource_model, :resource_name

View File

@@ -13,8 +13,8 @@ class Legislation::ProposalsController < Legislation::BaseController
invisible_captcha only: [:create, :update], honeypot: :subtitle
has_orders %w{confidence_score created_at}, only: :index
has_orders %w{most_voted newest oldest}, only: :show
has_orders %w[confidence_score created_at], only: :index
has_orders %w[most_voted newest oldest], only: :show
helper_method :resource_model, :resource_name
respond_to :html, :js

View File

@@ -2,7 +2,7 @@ class Legislation::QuestionsController < Legislation::BaseController
load_and_authorize_resource :process
load_and_authorize_resource :question, through: :process
has_orders %w{most_voted newest oldest}, only: :show
has_orders %w[most_voted newest oldest], only: :show
def show
@commentable = @question

View File

@@ -2,8 +2,8 @@ class Moderation::Budgets::InvestmentsController < Moderation::BaseController
include FeatureFlags
include ModerateActions
has_filters %w{pending_flag_review all with_ignored_flag}, only: :index
has_orders %w{flags created_at}, only: :index
has_filters %w[pending_flag_review all with_ignored_flag], only: :index
has_orders %w[flags created_at], only: :index
feature_flag :budgets

View File

@@ -1,8 +1,8 @@
class Moderation::CommentsController < Moderation::BaseController
include ModerateActions
has_filters %w{pending_flag_review all with_ignored_flag}, only: :index
has_orders %w{flags newest}, only: :index
has_filters %w[pending_flag_review all with_ignored_flag], only: :index
has_orders %w[flags newest], only: :index
before_action :load_resources, only: [:index, :moderate]

View File

@@ -2,8 +2,8 @@ class Moderation::DebatesController < Moderation::BaseController
include ModerateActions
include FeatureFlags
has_filters %w{pending_flag_review all with_ignored_flag}, only: :index
has_orders %w{flags created_at}, only: :index
has_filters %w[pending_flag_review all with_ignored_flag], only: :index
has_orders %w[flags created_at], only: :index
feature_flag :debates

View File

@@ -1,8 +1,8 @@
class Moderation::ProposalNotificationsController < Moderation::BaseController
include ModerateActions
has_filters %w{pending_review all ignored}, only: :index
has_orders %w{created_at moderated}, only: :index
has_filters %w[pending_review all ignored], only: :index
has_orders %w[created_at moderated], only: :index
before_action :load_resources, only: [:index, :moderate]

View File

@@ -2,8 +2,8 @@ class Moderation::ProposalsController < Moderation::BaseController
include ModerateActions
include FeatureFlags
has_filters %w{pending_flag_review all with_ignored_flag}, only: :index
has_orders %w{flags created_at}, only: :index
has_filters %w[pending_flag_review all with_ignored_flag], only: :index
has_orders %w[flags created_at], only: :index
feature_flag :proposals

View File

@@ -4,7 +4,7 @@ class TopicsController < ApplicationController
before_action :load_community
before_action :load_topic, only: [:show, :edit, :update, :destroy]
has_orders %w{most_voted newest oldest}, only: :show
has_orders %w[most_voted newest oldest], only: :show
skip_authorization_check only: :show
load_and_authorize_resource except: :show

View File

@@ -8,7 +8,7 @@ class Tracking::BudgetInvestmentsController < Tracking::BaseController
before_action :load_budget
before_action :load_investment, only: [:show, :edit]
has_orders %w{oldest}, only: [:show, :edit]
has_orders %w[oldest], only: [:show, :edit]
load_and_authorize_resource :investment, class: "Budget::Investment"

View File

@@ -1,5 +1,5 @@
class UsersController < ApplicationController
has_filters %w{proposals debates budget_investments comments follows}, only: :show
has_filters %w[proposals debates budget_investments comments follows], only: :show
load_and_authorize_resource
helper_method :author?

View File

@@ -9,8 +9,8 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
before_action :load_budget
before_action :load_investment, only: [:show, :edit, :valuate]
has_orders %w{oldest}, only: [:show, :edit]
has_filters %w{valuating valuation_finished}, only: :index
has_orders %w[oldest], only: [:show, :edit]
has_filters %w[valuating valuation_finished], only: :index
load_and_authorize_resource :investment, class: "Budget::Investment"