Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Commit

Permalink
my bad.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Gersing committed Jan 12, 2011
1 parent 5e29429 commit fce5706
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions app/controllers/presentation_questions_controller.rb
Expand Up @@ -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

0 comments on commit fce5706

Please sign in to comment.