Add and apply ShadowingOuterLocalVariable rule
Naming two variables the same way is confusing at the very least, and can lead to hard to debug errors. That's why the Ruby interpreter issues a warning when we do so.
This commit is contained in:
@@ -58,14 +58,13 @@ class Tracking::BudgetInvestmentsController < Tracking::BaseController
|
||||
}
|
||||
]
|
||||
|
||||
filters = investment_headings.inject(all_headings_filter) do |filters, heading|
|
||||
investment_headings.inject(all_headings_filter) do |filters, heading|
|
||||
filters << {
|
||||
name: heading.name,
|
||||
id: heading.id,
|
||||
count: investments.select { |i| i.heading_id == heading.id }.size
|
||||
}
|
||||
end
|
||||
filters.uniq
|
||||
end.uniq
|
||||
end
|
||||
|
||||
def restrict_access_to_assigned_items
|
||||
|
||||
Reference in New Issue
Block a user