sets up the @investments variable n investments_controller

This commit is contained in:
kikito
2016-12-16 18:03:14 +01:00
parent a52ea70c3d
commit 3bada69dd0

View File

@@ -25,6 +25,7 @@ module Budgets
def index
@investments = @investments.apply_filters_and_search(params).send("sort_by_#{@current_order}").page(params[:page]).per(10).for_render
@investment_ids = @investments.pluck(:id)
load_investment_votes(@investments)
end
@@ -36,6 +37,7 @@ module Budgets
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
set_comment_flags(@comment_tree.comments)
load_investment_votes(@investment)
@investment_ids = [@investment.id]
end
def create