Remove unnecessary condition in valuation investments
The budget is loaded using a method which raises an exception if it isn't found, so `@budget.present?` will always return true.
This commit is contained in:
@@ -16,7 +16,7 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
|
||||
|
||||
def index
|
||||
@heading_filters = heading_filters
|
||||
@investments = if current_user.valuator? && @budget.present?
|
||||
@investments = if current_user.valuator?
|
||||
@budget.investments.visible_to_valuator(current_user.valuator)
|
||||
.scoped_filter(params.permit(:budget_id, :heading_id), @current_filter)
|
||||
.order(cached_votes_up: :desc)
|
||||
|
||||
Reference in New Issue
Block a user