Merge pull request #2183 from consul/related-content

Related contents functionalities
This commit is contained in:
Raimond Garcia
2017-12-15 10:00:43 +01:00
committed by GitHub
13 changed files with 253 additions and 1 deletions

View File

@@ -22,6 +22,8 @@ class ProposalsController < ApplicationController
def show
super
@notifications = @proposal.notifications
@related_contents = Kaminari.paginate_array(@proposal.relationed_contents).page(params[:page]).per(5)
redirect_to proposal_path(@proposal), status: :moved_permanently if request.path != proposal_path(@proposal)
end