Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

my bad.

  • Loading branch information...
commit fce5706e2426c83f733534bf03c8c08e83504fb4 1 parent 5e29429
Leon Gersing authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 app/controllers/presentation_questions_controller.rb
View
13 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
Please sign in to comment.
Something went wrong with that request. Please try again.