Apply Style/HashSyntax rubocop rule
We were already using it almost everywhere.
This commit is contained in:
@@ -382,6 +382,9 @@ Style/ClassVars:
|
||||
Style/CollectionMethods:
|
||||
Enabled: true
|
||||
|
||||
Style/HashSyntax:
|
||||
Enabled: true
|
||||
|
||||
Style/Not:
|
||||
Enabled: true
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ wb.add_worksheet(name: "Resume") do |sheet|
|
||||
sheet.add_row [t("legislation.summary.debates_phase"), t("legislation.questions.question.total", count: @process.questions.count)]
|
||||
@process.questions.each do |question|
|
||||
sheet.add_row [question.title, t("legislation.summary.comments", count: question.comments.count)]
|
||||
sheet.add_hyperlink :location => legislation_process_question_url(question.process, question), :ref => sheet.rows.last.cells.first
|
||||
sheet.add_hyperlink location: legislation_process_question_url(question.process, question), ref: sheet.rows.last.cells.first
|
||||
question.best_comments(3).each do |comment|
|
||||
sheet.add_row [comment.body, (comment.cached_votes_up - comment.cached_votes_down).to_s + space + t("legislation.summary.votes")]
|
||||
sheet.add_hyperlink :location => comment_url(comment), :ref => sheet.rows.last.cells.first
|
||||
sheet.add_hyperlink location: comment_url(comment), ref: sheet.rows.last.cells.first
|
||||
end
|
||||
sheet.add_row ["", ""]
|
||||
end
|
||||
@@ -19,7 +19,7 @@ wb.add_worksheet(name: "Resume") do |sheet|
|
||||
Legislation::Proposal.where(legislation_process_id: @process).where(selected: true).order("cached_votes_score desc").each do |proposal|
|
||||
sheet.add_row [proposal.title,
|
||||
(proposal.cached_votes_total - proposal.cached_votes_down).to_s + space + t("legislation.summary.votes")]
|
||||
sheet.add_hyperlink :location => legislation_process_proposal_url(proposal.legislation_process_id, proposal), :ref => sheet.rows.last.cells.first
|
||||
sheet.add_hyperlink location: legislation_process_proposal_url(proposal.legislation_process_id, proposal), ref: sheet.rows.last.cells.first
|
||||
end
|
||||
sheet.add_row ["", ""]
|
||||
end
|
||||
@@ -30,7 +30,7 @@ wb.add_worksheet(name: "Resume") do |sheet|
|
||||
@process.get_best_annotation_comments.take(10).each do |comment|
|
||||
sheet.add_row [Legislation::Annotation.find_by(id: comment.commentable_id).quote, ""]
|
||||
sheet.add_row [comment.body, (comment.cached_votes_up - comment.cached_votes_down).to_s + space + t("legislation.summary.votes")]
|
||||
sheet.add_hyperlink :location => comment_url(comment), :ref => sheet.rows.last.cells.first
|
||||
sheet.add_hyperlink location: comment_url(comment), ref: sheet.rows.last.cells.first
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,6 @@ class CreateInappropiateFlags < ActiveRecord::Migration[4.2]
|
||||
end
|
||||
|
||||
add_index :inappropiate_flags, [:flaggable_type, :flaggable_id]
|
||||
add_index :inappropiate_flags, [:user_id, :flaggable_type, :flaggable_id], :name => "access_inappropiate_flags"
|
||||
add_index :inappropiate_flags, [:user_id, :flaggable_type, :flaggable_id], name: "access_inappropiate_flags"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,11 +9,11 @@ class AddTranslatePages < ActiveRecord::Migration[4.2]
|
||||
{ migrate_data: true }
|
||||
)
|
||||
|
||||
change_column :site_customization_pages, :title, :string, :null => true
|
||||
change_column :site_customization_pages, :title, :string, null: true
|
||||
end
|
||||
|
||||
def self.down
|
||||
SiteCustomization::Page.drop_translation_table!
|
||||
change_column :site_customization_pages, :title, :string, :null => false
|
||||
change_column :site_customization_pages, :title, :string, null: false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -38,7 +38,7 @@ class RemoteTranslations::Microsoft::AvailableLocales
|
||||
request = Net::HTTP::Get.new(uri)
|
||||
request["Ocp-Apim-Subscription-Key"] = Rails.application.secrets.microsoft_api_key
|
||||
|
||||
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == "https") do |http|
|
||||
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
|
||||
http.request(request)
|
||||
end
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ describe "Legislation" do
|
||||
|
||||
phases.each do |phase|
|
||||
within(".legislation-process-list") do
|
||||
find("li", :text => "#{phase}").click_link
|
||||
find("li", text: "#{phase}").click_link
|
||||
end
|
||||
|
||||
expect(page).to have_content(document.title)
|
||||
|
||||
@@ -276,8 +276,8 @@ describe "Valuation budget investments" do
|
||||
|
||||
expect(page).to have_content("Create progress bar")
|
||||
|
||||
select("Primary", :from => "Type")
|
||||
fill_in("Current progress", :with => 50)
|
||||
select("Primary", from: "Type")
|
||||
fill_in("Current progress", with: 50)
|
||||
|
||||
click_button "Create Progress bar"
|
||||
|
||||
@@ -295,9 +295,9 @@ describe "Valuation budget investments" do
|
||||
|
||||
expect(page).to have_content("Create progress bar")
|
||||
|
||||
select("Secondary", :from => "Type")
|
||||
fill_in("Title", :with => "secondary_progress_bar")
|
||||
fill_in("Current progress", :with => 50)
|
||||
select("Secondary", from: "Type")
|
||||
fill_in("Title", with: "secondary_progress_bar")
|
||||
fill_in("Current progress", with: 50)
|
||||
|
||||
click_button "Create Progress bar"
|
||||
|
||||
@@ -340,7 +340,7 @@ describe "Valuation budget investments" do
|
||||
|
||||
page.find("#progress_bar_#{secondary_progress_bar.id}").click_link("Edit")
|
||||
|
||||
fill_in("Title", :with => "edited")
|
||||
fill_in("Title", with: "edited")
|
||||
click_button "Update Progress bar"
|
||||
|
||||
expect(page).to have_content("Progress bars")
|
||||
|
||||
Reference in New Issue
Block a user