Add and apply Lint/SymbolConversion rubocop rule
This rule was added in Rubocop 1.9.0. We're excluding the Setting model in order to keep the settings consistent.
This commit is contained in:
@@ -187,6 +187,12 @@ Lint/SafeNavigationChain:
|
|||||||
Lint/ShadowingOuterLocalVariable:
|
Lint/ShadowingOuterLocalVariable:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Lint/SymbolConversion:
|
||||||
|
Enabled: true
|
||||||
|
Exclude:
|
||||||
|
- "app/models/setting.rb"
|
||||||
|
- "db/dev_seeds/settings.rb"
|
||||||
|
|
||||||
Lint/UselessAssignment:
|
Lint/UselessAssignment:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
|||||||
@@ -99,9 +99,9 @@ class Legislation::AnnotationsController < Legislation::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def track_event
|
def track_event
|
||||||
ahoy.track "legislation_annotation_created".to_sym,
|
ahoy.track :legislation_annotation_created,
|
||||||
"legislation_annotation_id": @annotation.id,
|
legislation_annotation_id: @annotation.id,
|
||||||
"legislation_draft_version_id": @draft_version.id
|
legislation_draft_version_id: @draft_version.id
|
||||||
end
|
end
|
||||||
|
|
||||||
def convert_ranges_parameters
|
def convert_ranges_parameters
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ class Legislation::AnswersController < Legislation::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def track_event
|
def track_event
|
||||||
ahoy.track "legislation_answer_created".to_sym,
|
ahoy.track :legislation_answer_created,
|
||||||
"legislation_answer_id": @answer.id,
|
legislation_answer_id: @answer.id,
|
||||||
"legislation_question_option_id": @answer.legislation_question_option_id,
|
legislation_question_option_id: @answer.legislation_question_option_id,
|
||||||
"legislation_question_id": @answer.legislation_question_id
|
legislation_question_id: @answer.legislation_question_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<% if user_signed_in? && !comments_closed_for_commentable?(comment.commentable) && !require_verified_resident_for_commentable?(comment.commentable, current_user) %>
|
<% if user_signed_in? && !comments_closed_for_commentable?(comment.commentable) && !require_verified_resident_for_commentable?(comment.commentable, current_user) %>
|
||||||
<span class="divider"> | </span>
|
<span class="divider"> | </span>
|
||||||
<%= link_to(comment_link_text(comment), "",
|
<%= link_to(comment_link_text(comment), "",
|
||||||
class: "js-add-comment-link", data: { "id": dom_id(comment) }) %>
|
class: "js-add-comment-link", data: { id: dom_id(comment) }) %>
|
||||||
|
|
||||||
<% unless valuation %>
|
<% unless valuation %>
|
||||||
<%= render "comments/actions", { comment: comment } %>
|
<%= render "comments/actions", { comment: comment } %>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ describe "Images", :admin do
|
|||||||
it_behaves_like "nested imageable",
|
it_behaves_like "nested imageable",
|
||||||
"poll_question_answer",
|
"poll_question_answer",
|
||||||
"new_admin_answer_image_path",
|
"new_admin_answer_image_path",
|
||||||
{ "answer_id": "id" },
|
{ answer_id: "id" },
|
||||||
nil,
|
nil,
|
||||||
"Save image",
|
"Save image",
|
||||||
"Image uploaded successfully",
|
"Image uploaded successfully",
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ describe "Budget Investments" do
|
|||||||
it_behaves_like "remotely_translatable",
|
it_behaves_like "remotely_translatable",
|
||||||
:budget_investment,
|
:budget_investment,
|
||||||
"budget_investments_path",
|
"budget_investments_path",
|
||||||
{ "budget_id": "budget_id" }
|
{ budget_id: "budget_id" }
|
||||||
|
|
||||||
it_behaves_like "remotely_translatable",
|
it_behaves_like "remotely_translatable",
|
||||||
:budget_investment,
|
:budget_investment,
|
||||||
"budget_investment_path",
|
"budget_investment_path",
|
||||||
{ "budget_id": "budget_id", "id": "id" }
|
{ budget_id: "budget_id", id: "id" }
|
||||||
it_behaves_like "flaggable", :budget_investment
|
it_behaves_like "flaggable", :budget_investment
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1039,25 +1039,25 @@ describe "Budget Investments" do
|
|||||||
expect(page).not_to have_content("Local government is not competent in this matter")
|
expect(page).not_to have_content("Local government is not competent in this matter")
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like "followable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
|
it_behaves_like "followable", "budget_investment", "budget_investment_path", { budget_id: "budget_id", id: "id" }
|
||||||
|
|
||||||
it_behaves_like "imageable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
|
it_behaves_like "imageable", "budget_investment", "budget_investment_path", { budget_id: "budget_id", id: "id" }
|
||||||
|
|
||||||
it_behaves_like "nested imageable",
|
it_behaves_like "nested imageable",
|
||||||
"budget_investment",
|
"budget_investment",
|
||||||
"new_budget_investment_path",
|
"new_budget_investment_path",
|
||||||
{ "budget_id": "budget_id" },
|
{ budget_id: "budget_id" },
|
||||||
"imageable_fill_new_valid_budget_investment",
|
"imageable_fill_new_valid_budget_investment",
|
||||||
"Create Investment",
|
"Create Investment",
|
||||||
"Budget Investment created successfully."
|
"Budget Investment created successfully."
|
||||||
|
|
||||||
it_behaves_like "documentable", "budget_investment", "budget_investment_path", { "budget_id": "budget_id", "id": "id" }
|
it_behaves_like "documentable", "budget_investment", "budget_investment_path", { budget_id: "budget_id", id: "id" }
|
||||||
|
|
||||||
it_behaves_like "nested documentable",
|
it_behaves_like "nested documentable",
|
||||||
"user",
|
"user",
|
||||||
"budget_investment",
|
"budget_investment",
|
||||||
"new_budget_investment_path",
|
"new_budget_investment_path",
|
||||||
{ "budget_id": "budget_id" },
|
{ budget_id: "budget_id" },
|
||||||
"documentable_fill_new_valid_budget_investment",
|
"documentable_fill_new_valid_budget_investment",
|
||||||
"Create Investment",
|
"Create Investment",
|
||||||
"Budget Investment created successfully."
|
"Budget Investment created successfully."
|
||||||
@@ -1068,7 +1068,7 @@ describe "Budget Investments" do
|
|||||||
"new_budget_investment_path",
|
"new_budget_investment_path",
|
||||||
"",
|
"",
|
||||||
"budget_investment_path",
|
"budget_investment_path",
|
||||||
{ "budget_id": "budget_id" }
|
{ budget_id: "budget_id" }
|
||||||
|
|
||||||
context "Destroy" do
|
context "Destroy" do
|
||||||
scenario "Admin cannot destroy budget investments", :admin do
|
scenario "Admin cannot destroy budget investments", :admin do
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ describe "Debates" do
|
|||||||
it_behaves_like "remotely_translatable",
|
it_behaves_like "remotely_translatable",
|
||||||
:debate,
|
:debate,
|
||||||
"debate_path",
|
"debate_path",
|
||||||
{ "id": "id" }
|
{ id: "id" }
|
||||||
it_behaves_like "flaggable", :debate
|
it_behaves_like "flaggable", :debate
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ describe "Budget Investments" do
|
|||||||
"user",
|
"user",
|
||||||
"budget_investment",
|
"budget_investment",
|
||||||
"new_management_budget_investment_path",
|
"new_management_budget_investment_path",
|
||||||
{ "budget_id": "budget_id" },
|
{ budget_id: "budget_id" },
|
||||||
"documentable_fill_new_valid_budget_investment",
|
"documentable_fill_new_valid_budget_investment",
|
||||||
"Create Investment",
|
"Create Investment",
|
||||||
"Investment created successfully.",
|
"Investment created successfully.",
|
||||||
@@ -20,7 +20,7 @@ describe "Budget Investments" do
|
|||||||
it_behaves_like "nested imageable",
|
it_behaves_like "nested imageable",
|
||||||
"budget_investment",
|
"budget_investment",
|
||||||
"new_management_budget_investment_path",
|
"new_management_budget_investment_path",
|
||||||
{ "budget_id": "budget_id" },
|
{ budget_id: "budget_id" },
|
||||||
"imageable_fill_new_valid_budget_investment",
|
"imageable_fill_new_valid_budget_investment",
|
||||||
"Create Investment",
|
"Create Investment",
|
||||||
"Investment created successfully.",
|
"Investment created successfully.",
|
||||||
@@ -32,7 +32,7 @@ describe "Budget Investments" do
|
|||||||
"new_management_budget_investment_path",
|
"new_management_budget_investment_path",
|
||||||
"",
|
"",
|
||||||
"management_budget_investment_path",
|
"management_budget_investment_path",
|
||||||
{ "budget_id": "budget_id" },
|
{ budget_id: "budget_id" },
|
||||||
management: true
|
management: true
|
||||||
|
|
||||||
context "Load" do
|
context "Load" do
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ describe "Proposals" do
|
|||||||
it_behaves_like "remotely_translatable",
|
it_behaves_like "remotely_translatable",
|
||||||
:proposal,
|
:proposal,
|
||||||
"proposal_path",
|
"proposal_path",
|
||||||
{ "id": "id" }
|
{ id: "id" }
|
||||||
it_behaves_like "flaggable", :proposal
|
it_behaves_like "flaggable", :proposal
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1257,9 +1257,9 @@ describe "Proposals" do
|
|||||||
expect(page).not_to have_content "This proposal has been flagged as inappropriate by several users."
|
expect(page).not_to have_content "This proposal has been flagged as inappropriate by several users."
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like "followable", "proposal", "proposal_path", { "id": "id" }
|
it_behaves_like "followable", "proposal", "proposal_path", { id: "id" }
|
||||||
|
|
||||||
it_behaves_like "imageable", "proposal", "proposal_path", { "id": "id" }
|
it_behaves_like "imageable", "proposal", "proposal_path", { id: "id" }
|
||||||
|
|
||||||
it_behaves_like "nested imageable",
|
it_behaves_like "nested imageable",
|
||||||
"proposal",
|
"proposal",
|
||||||
@@ -1272,12 +1272,12 @@ describe "Proposals" do
|
|||||||
it_behaves_like "nested imageable",
|
it_behaves_like "nested imageable",
|
||||||
"proposal",
|
"proposal",
|
||||||
"edit_proposal_path",
|
"edit_proposal_path",
|
||||||
{ "id": "id" },
|
{ id: "id" },
|
||||||
nil,
|
nil,
|
||||||
"Save changes",
|
"Save changes",
|
||||||
"Proposal updated successfully"
|
"Proposal updated successfully"
|
||||||
|
|
||||||
it_behaves_like "documentable", "proposal", "proposal_path", { "id": "id" }
|
it_behaves_like "documentable", "proposal", "proposal_path", { id: "id" }
|
||||||
|
|
||||||
it_behaves_like "nested documentable",
|
it_behaves_like "nested documentable",
|
||||||
"user",
|
"user",
|
||||||
@@ -1292,7 +1292,7 @@ describe "Proposals" do
|
|||||||
"user",
|
"user",
|
||||||
"proposal",
|
"proposal",
|
||||||
"edit_proposal_path",
|
"edit_proposal_path",
|
||||||
{ "id": "id" },
|
{ id: "id" },
|
||||||
nil,
|
nil,
|
||||||
"Save changes",
|
"Save changes",
|
||||||
"Proposal updated successfully"
|
"Proposal updated successfully"
|
||||||
|
|||||||
Reference in New Issue
Block a user