Remove consecutive blank lines
This commit is contained in:
@@ -26,6 +26,9 @@ Layout/IndentationConsistency:
|
||||
Layout/IndentationWidth:
|
||||
Enabled: true
|
||||
|
||||
Layout/EmptyLines:
|
||||
Enabled: true
|
||||
|
||||
Layout/EndOfLine:
|
||||
EnforcedStyle: lf
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class Admin::Poll::ActivePollsController < Admin::Poll::BaseController
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def load_active_poll
|
||||
|
||||
@@ -15,7 +15,6 @@ class Dashboard::SupportsController < Dashboard::BaseController
|
||||
accumulate_supports(grouped_votes)
|
||||
end
|
||||
|
||||
|
||||
def supports
|
||||
@supports ||= Vote
|
||||
.where(votable: proposal,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) }
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -110,7 +110,6 @@ class VotationType < ApplicationRecord
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<% if @account.email.present? %>
|
||||
<h2><%= t("account.show.notifications")%></h2>
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<a class="small float-right clear" data-open="download-modal"><%= t("admin.budget_investments.index.download_current_selection") %></a>
|
||||
|
||||
|
||||
<% if params[:advanced_filters].include?("winners") %>
|
||||
<% if display_calculate_winners_button?(@budget) %>
|
||||
<%= link_to calculate_winner_button_text(@budget),
|
||||
|
||||
@@ -127,7 +127,6 @@
|
||||
label: t("admin.budget_investments.edit.milestone_tags") %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="small-12 column margin-top">
|
||||
<%= f.submit(class: "button", value: t("admin.budget_investments.edit.submit_button")) %>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<h2><%= t("admin.hidden_comments.index.title") %></h2>
|
||||
<p><%= t("admin.shared.moderated_content") %></p>
|
||||
|
||||
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_comments.index" %>
|
||||
|
||||
<% if @comments.any? %>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<h2><%= t("admin.hidden_debates.index.title") %></h2>
|
||||
<p><%= t("admin.shared.moderated_content") %></p>
|
||||
|
||||
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_debates.index" %>
|
||||
|
||||
<% if @debates.any? %>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<%= simple_format @signature_sheet.required_fields_to_verify %>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="verified_signatures" class="callout success">
|
||||
<strong>
|
||||
<%= t("admin.signature_sheets.show.verified",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="users">
|
||||
<%= render "users" %>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<table>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tabs-content" data-tabs-content="topics-tabs">
|
||||
<%= render "topics/filter_subnav" %>
|
||||
<div class="tabs-panel is-active" id="tab-comments">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
<%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %>
|
||||
|
||||
|
||||
<%= f.password_field :password, autocomplete: "off",
|
||||
placeholder: t("devise_views.users.registrations.new.password_label") %>
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<main>
|
||||
<%= render "feeds" %>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<% if @cards.any? %>
|
||||
<div class="small-12 column <%= "large-8" if feed_processes_enabled? %>">
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace :deploy do
|
||||
|
||||
after :finishing, "deploy:cleanup"
|
||||
|
||||
|
||||
desc "Deploys and runs the tasks needed to upgrade to a new release"
|
||||
task :upgrade do
|
||||
after "add_new_settings", "execute_release_tasks"
|
||||
|
||||
@@ -48,7 +48,6 @@ Rails.application.configure do
|
||||
# config.action_cable.url = 'wss://example.com/cable'
|
||||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
||||
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
config.force_ssl = true
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ class EmailDigest
|
||||
notifications.any?
|
||||
end
|
||||
|
||||
|
||||
def deliver(run_at)
|
||||
if valid_email? && pending_notifications?
|
||||
Mailer.delay(run_at: run_at).proposal_notification_digest(user, notifications.to_a)
|
||||
|
||||
@@ -16,7 +16,6 @@ describe Legislation::AnnotationsController do
|
||||
title: "Final version") }
|
||||
let(:user) { create(:user, :level_two) }
|
||||
|
||||
|
||||
it "creates an ahoy event" do
|
||||
sign_in user
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ describe "Admin Notifications" do
|
||||
click_link "Edit"
|
||||
end
|
||||
|
||||
|
||||
fill_in_admin_notification_form(segment_recipient: "All users",
|
||||
title: "Other title",
|
||||
body: "Other body",
|
||||
|
||||
@@ -687,7 +687,6 @@ describe "Admin budget investments" do
|
||||
administrator: administrator)
|
||||
create(:budget_investment, budget: budget, title: "More hospitals")
|
||||
|
||||
|
||||
visit admin_budget_budget_investments_path(budget_id: budget.id)
|
||||
|
||||
expect(page).to have_css(".budget_investment", count: 3)
|
||||
@@ -767,7 +766,6 @@ describe "Admin budget investments" do
|
||||
administrator: administrator)
|
||||
create(:budget_investment, budget: budget, title: "More hostals")
|
||||
|
||||
|
||||
visit admin_budget_budget_investments_path(budget_id: budget.id)
|
||||
|
||||
expect(page).to have_css(".budget_investment", count: 4)
|
||||
@@ -1884,7 +1882,6 @@ describe "Admin budget investments" do
|
||||
expect(cookie_value).to eq("id,supports,admin,geozone," +
|
||||
"feasibility,valuation_finished,visible_to_valuators,selected,incompatible,author")
|
||||
|
||||
|
||||
visit admin_budget_budget_investments_path(budget)
|
||||
|
||||
cookies = page.driver.browser.manage.all_cookies
|
||||
|
||||
@@ -286,7 +286,6 @@ describe "Admin budgets" do
|
||||
expect(page).not_to have_content unselected.title
|
||||
expect(page).not_to have_content selected.title
|
||||
|
||||
|
||||
visit edit_admin_budget_path(budget)
|
||||
expect(page).to have_content "See results"
|
||||
end
|
||||
|
||||
@@ -32,7 +32,6 @@ describe "Admin Budgets" do
|
||||
name_en: "Budget for climate change",
|
||||
name_fr: "Budget pour le changement climatique")
|
||||
|
||||
|
||||
visit admin_budgets_path
|
||||
select("Français", from: "locale-switcher")
|
||||
|
||||
|
||||
@@ -75,8 +75,6 @@ describe "Legislation" do
|
||||
@debate = create(:legislation_question, process: @process, title: "Question 2")
|
||||
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 3")
|
||||
create(:debate_comment, user: user, commentable_id: @debate.id, body: "Answer 4")
|
||||
|
||||
|
||||
end
|
||||
|
||||
scenario "show debates list" do
|
||||
|
||||
@@ -367,5 +367,4 @@ describe "Poll Votation Type" do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -547,7 +547,6 @@ describe "Valuation budget investments" do
|
||||
investment = create(:budget_investment, budget: budget)
|
||||
investment.valuators << [valuator]
|
||||
|
||||
|
||||
login_as(admin.user)
|
||||
visit valuation_budget_budget_investment_path(budget, investment)
|
||||
click_link "Edit dossier"
|
||||
|
||||
@@ -121,5 +121,4 @@ describe "Welcome screen" do
|
||||
Setting["feature.user.skip_verification"] = nil
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -77,6 +77,4 @@ describe SignatureSheetsHelper do
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -168,7 +168,6 @@ describe Budget::Heading do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe "save longitude" do
|
||||
|
||||
it "Doesn't allow longitude < -180" do
|
||||
@@ -267,7 +266,6 @@ describe Budget::Heading do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe "heading" do
|
||||
it "can be deleted if no budget's investments associated" do
|
||||
heading1 = create(:budget_heading, group: group, name: "name")
|
||||
|
||||
@@ -279,7 +279,6 @@ describe Dashboard::Action do
|
||||
let!(:resource) { create(:dashboard_action, :resource, :active, day_offset: 0,
|
||||
published_proposal: true) }
|
||||
|
||||
|
||||
it "when proposal has been created today and day_offset is valid only for today" do
|
||||
expect(described_class.detect_new_actions_since(Date.yesterday,
|
||||
proposal)).to include(resource.id)
|
||||
|
||||
@@ -20,7 +20,6 @@ RSpec.describe Legislation::Process::Phase, type: :model do
|
||||
expect(process.draft_phase.enabled?).to be false
|
||||
end
|
||||
|
||||
|
||||
it "checks allegations phase" do
|
||||
expect(process.allegations_phase.enabled?).to be true
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ describe Poll::PairAnswer do
|
||||
|
||||
end
|
||||
|
||||
|
||||
describe "#generate_pair" do
|
||||
let(:user) { create(:user) }
|
||||
let(:question) { create(:poll_question) }
|
||||
|
||||
Reference in New Issue
Block a user