Remove uneeded document and image initializations
This commit is contained in:
@@ -31,7 +31,6 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@document = Document.new(documentable: @question)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ module Budgets
|
|||||||
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]
|
||||||
@document = Document.new(documentable: @investment)
|
|
||||||
@image = Image.new(imageable: @investment)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class Polls::QuestionsController < ApplicationController
|
|||||||
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
|
@comment_tree = CommentTree.new(@commentable, params[:page], @current_order)
|
||||||
set_comment_flags(@comment_tree.comments)
|
set_comment_flags(@comment_tree.comments)
|
||||||
|
|
||||||
@document = Document.new(documentable: @question)
|
|
||||||
|
|
||||||
question_answer = @question.answers.where(author_id: current_user.try(:id)).first
|
question_answer = @question.answers.where(author_id: current_user.try(:id)).first
|
||||||
@answers_by_question_id = {@question.id => question_answer.try(:answer)}
|
@answers_by_question_id = {@question.id => question_answer.try(:answer)}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ class ProposalsController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
super
|
super
|
||||||
@notifications = @proposal.notifications
|
@notifications = @proposal.notifications
|
||||||
@document = Document.new(documentable: @proposal)
|
|
||||||
@image = Image.new(imageable: @proposal)
|
|
||||||
redirect_to proposal_path(@proposal), status: :moved_permanently if request.path != proposal_path(@proposal)
|
redirect_to proposal_path(@proposal), status: :moved_permanently if request.path != proposal_path(@proposal)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user