displays proposal created within management layout

This commit is contained in:
rgarcia
2015-10-13 14:57:27 +02:00
parent 06e35a032d
commit dc93ea6dba
6 changed files with 15 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ class Management::ProposalsController < Management::BaseController
include CommentableActions
before_action :check_verified_user, except: :print
before_action :set_proposal, only: :vote
before_action :set_proposal, only: [:vote, :show]
before_action :parse_search_terms, only: :index
has_orders %w{hot_score confidence_score created_at most_commented random}, only: [:index, :print]
@@ -42,9 +42,14 @@ class Management::ProposalsController < Management::BaseController
managed_user
end
#Duplicated in application_controller. Move to a concenrn.
### Duplicated in application_controller. Move to a concenrn.
def set_proposal_votes(proposals)
@proposal_votes = current_user ? current_user.proposal_votes(proposals) : {}
end
def set_comment_flags(comments)
@comment_flags = current_user ? current_user.comment_flags(comments) : {}
end
###
end