diff --git a/.rubocop_basic.yml b/.rubocop_basic.yml index 8529369be..d264ee91c 100644 --- a/.rubocop_basic.yml +++ b/.rubocop_basic.yml @@ -26,6 +26,9 @@ Layout/IndentationConsistency: Layout/IndentationWidth: Enabled: true +Layout/EmptyLines: + Enabled: true + Layout/EndOfLine: EnforcedStyle: lf diff --git a/app/controllers/admin/poll/active_polls_controller.rb b/app/controllers/admin/poll/active_polls_controller.rb index 97665ac2f..17690a803 100644 --- a/app/controllers/admin/poll/active_polls_controller.rb +++ b/app/controllers/admin/poll/active_polls_controller.rb @@ -22,7 +22,6 @@ class Admin::Poll::ActivePollsController < Admin::Poll::BaseController end end - private def load_active_poll diff --git a/app/controllers/dashboard/supports_controller.rb b/app/controllers/dashboard/supports_controller.rb index 3605c6132..177cc24fb 100644 --- a/app/controllers/dashboard/supports_controller.rb +++ b/app/controllers/dashboard/supports_controller.rb @@ -15,7 +15,6 @@ class Dashboard::SupportsController < Dashboard::BaseController accumulate_supports(grouped_votes) end - def supports @supports ||= Vote .where(votable: proposal, diff --git a/app/controllers/legislation/processes_controller.rb b/app/controllers/legislation/processes_controller.rb index 85374f27a..c450963e4 100644 --- a/app/controllers/legislation/processes_controller.rb +++ b/app/controllers/legislation/processes_controller.rb @@ -10,7 +10,6 @@ class Legislation::ProcessesController < Legislation::BaseController before_action :set_random_seed, only: :proposals before_action :check_past, only: :resume - def index @current_filter ||= "open" @processes = ::Legislation::Process.send(@current_filter).published diff --git a/app/models/poll/pair_answer.rb b/app/models/poll/pair_answer.rb index 2b314565c..215d638d7 100644 --- a/app/models/poll/pair_answer.rb +++ b/app/models/poll/pair_answer.rb @@ -18,7 +18,6 @@ class Poll::PairAnswer < ApplicationRecord validates :answer_right, inclusion: { in: ->(a) { a.question.question_answers.visibles }}, unless: ->(a) { a.question.blank? } - scope :by_author, ->(author_id) { where(author_id: author_id) } scope :by_question, ->(question_id) { where(question_id: question_id) } diff --git a/app/models/user.rb b/app/models/user.rb index 2f787f34d..b5ffacd5f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -358,7 +358,6 @@ class User < ApplicationRecord followables.compact.map { |followable| followable.tags.map(&:name) }.flatten.compact.uniq end - def self.current_user Thread.current[:user] end diff --git a/app/models/votation_type.rb b/app/models/votation_type.rb index c84418401..95fd384e2 100644 --- a/app/models/votation_type.rb +++ b/app/models/votation_type.rb @@ -110,7 +110,6 @@ class VotationType < ApplicationRecord end end - result end diff --git a/app/views/account/show.html.erb b/app/views/account/show.html.erb index 871e2de0d..b1f16af33 100644 --- a/app/views/account/show.html.erb +++ b/app/views/account/show.html.erb @@ -49,7 +49,6 @@ <% end %> - <% if @account.email.present? %>
<%= t("admin.shared.moderated_content") %>
- <%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_comments.index" %> <% if @comments.any? %> diff --git a/app/views/admin/hidden_debates/index.html.erb b/app/views/admin/hidden_debates/index.html.erb index 92bb70c8c..25cfd7102 100644 --- a/app/views/admin/hidden_debates/index.html.erb +++ b/app/views/admin/hidden_debates/index.html.erb @@ -1,7 +1,6 @@<%= t("admin.shared.moderated_content") %>
- <%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_debates.index" %> <% if @debates.any? %> diff --git a/app/views/admin/signature_sheets/show.html.erb b/app/views/admin/signature_sheets/show.html.erb index 622842099..91fdc270a 100644 --- a/app/views/admin/signature_sheets/show.html.erb +++ b/app/views/admin/signature_sheets/show.html.erb @@ -18,7 +18,6 @@ <%= simple_format @signature_sheet.required_fields_to_verify %> -