lib/controller_patches.rb
def survey_reset
      raise "Not allowed in production" if ENV["RAILS_ENV"] == "production"
      raise "Not logged in" if !@user
      @user.survey.allow_new_survey
      return redirect_to survey_url
    end
# Reset the state of the survey so it can be answered again.
# Handy for testing; not allowed in production.
Reset the state of the survey so it can be answered again.
Handy for testing; not allowed in production.
Reset the state of the survey so it can be answered again . Handy for testing ; not allowed in production .
def survey_reset
      raise "Not allowed in production" if ENV["RAILS_ENV"] == "production"
      raise "Not logged in" if !@user
      @user.survey.allow_new_survey
      return redirect_to survey_url
    end
def survey_reset raise "Not allowed in production" if ENV [ "RAILS_ENV" ] == "production" raise "Not logged in" if ! @user @user . survey . allow_new_survey return redirect_to survey_url end
Reset the state of the survey so it can be answered again.
Reset the state of the survey so it can be answered again .