diff --git a/app/controllers/presentation_questions_controller.rb b/app/controllers/presentation_questions_controller.rb index 9bce402..5c6df80 100644 --- a/app/controllers/presentation_questions_controller.rb +++ b/app/controllers/presentation_questions_controller.rb @@ -2,17 +2,16 @@ class PresentationQuestionsController < ApplicationController before_filter :check_authorization, :load_presentation def create - @question = @presentation.presentation_questions.new(params[:presentation_question]) do |q| - @question.user = current_user + @question = @presentation.presentation_questions.new(params[:presentation_question]) + @question.user = @current_user if @question.save redirect_to :action => "show", :controller => "presentations", :id => params[:presentation_id] else render :action => "show" end end - - private - def load_presentation - @presentation = Presentation.find(params[:presentation_id]) - end + + def load_presentation + @presentation = Presentation.find_by_id params[:presentation_id] + end end