Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ResponsesController < ApplicationController
- rescue_from Question::NoRandomQuestionsLeft, :with => :no_more_questions
- def new
- @question = current_question_distributor.current_question(true, :include => :answers)
- end
- private
- def no_more_questions
- flash[:warning] = "You have answered all the questions. Please check back again."
- respond_to do |format|
- format.html { redirect_to ask_path }
- format.xml {}
- end
- end
- end
Add Comment
Please, Sign In to add comment