Remove uneeded document and image initializations

This commit is contained in:
Senén Rodero Rodríguez
2017-09-24 12:28:45 +02:00
parent e58feb7d6d
commit f6fba64012
4 changed files with 0 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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