Added related contents to budget investments

This commit is contained in:
María Checa
2018-01-11 16:49:07 +01:00
parent 1fee0eb2aa
commit c56a7b4e16
2 changed files with 2 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ module Budgets
def show def show
@commentable = @investment @commentable = @investment
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order) @comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
@related_contents = Kaminari.paginate_array(@investment.relationed_contents).page(params[:page]).per(5)
set_comment_flags(@comment_tree.comments) set_comment_flags(@comment_tree.comments)
load_investment_votes(@investment) load_investment_votes(@investment)
@investment_ids = [@investment.id] @investment_ids = [@investment.id]

View File

@@ -76,6 +76,7 @@
<p><%= investment.price_explanation %></p> <p><%= investment.price_explanation %></p>
<% end %> <% end %>
<%= render 'relationable/related_content', relationable: @investment %>
</div> </div>
<aside class="small-12 medium-3 column"> <aside class="small-12 medium-3 column">