|
| 1 | +class SurveyQuestionResultsController < ApplicationController |
| 2 | + # GET /survey_question_results |
| 3 | + # GET /survey_question_results.xml |
| 4 | + def index |
| 5 | + @survey_question_results = SurveyQuestionResult.all |
| 6 | + |
| 7 | + respond_to do |format| |
| 8 | + format.html # index.html.erb |
| 9 | + format.xml { render :xml => @survey_question_results } |
| 10 | + end |
| 11 | + end |
| 12 | + |
| 13 | + # GET /survey_question_results/1 |
| 14 | + # GET /survey_question_results/1.xml |
| 15 | + def show |
| 16 | + @survey_question_result = SurveyQuestionResult.find(params[:id]) |
| 17 | + |
| 18 | + respond_to do |format| |
| 19 | + format.html # show.html.erb |
| 20 | + format.xml { render :xml => @survey_question_result } |
| 21 | + end |
| 22 | + end |
| 23 | + |
| 24 | + # GET /survey_question_results/new |
| 25 | + # GET /survey_question_results/new.xml |
| 26 | + def new |
| 27 | + @survey_question_result = SurveyQuestionResult.new |
| 28 | + |
| 29 | + respond_to do |format| |
| 30 | + format.html # new.html.erb |
| 31 | + format.xml { render :xml => @survey_question_result } |
| 32 | + end |
| 33 | + end |
| 34 | + |
| 35 | + # GET /survey_question_results/1/edit |
| 36 | + def edit |
| 37 | + @survey_question_result = SurveyQuestionResult.find(params[:id]) |
| 38 | + end |
| 39 | + |
| 40 | + # POST /survey_question_results |
| 41 | + # POST /survey_question_results.xml |
| 42 | + def create |
| 43 | + @survey_question_result = SurveyQuestionResult.new(params[:survey_question_result]) |
| 44 | + |
| 45 | + respond_to do |format| |
| 46 | + if @survey_question_result.save |
| 47 | + format.html { redirect_to(@survey_question_result, :notice => 'Survey question result was successfully created.') } |
| 48 | + format.xml { render :xml => @survey_question_result, :status => :created, :location => @survey_question_result } |
| 49 | + else |
| 50 | + format.html { render :action => "new" } |
| 51 | + format.xml { render :xml => @survey_question_result.errors, :status => :unprocessable_entity } |
| 52 | + end |
| 53 | + end |
| 54 | + end |
| 55 | + |
| 56 | + # PUT /survey_question_results/1 |
| 57 | + # PUT /survey_question_results/1.xml |
| 58 | + def update |
| 59 | + @survey_question_result = SurveyQuestionResult.find(params[:id]) |
| 60 | + |
| 61 | + respond_to do |format| |
| 62 | + if @survey_question_result.update_attributes(params[:survey_question_result]) |
| 63 | + format.html { redirect_to(@survey_question_result, :notice => 'Survey question result was successfully updated.') } |
| 64 | + format.xml { head :ok } |
| 65 | + else |
| 66 | + format.html { render :action => "edit" } |
| 67 | + format.xml { render :xml => @survey_question_result.errors, :status => :unprocessable_entity } |
| 68 | + end |
| 69 | + end |
| 70 | + end |
| 71 | + |
| 72 | + # DELETE /survey_question_results/1 |
| 73 | + # DELETE /survey_question_results/1.xml |
| 74 | + def destroy |
| 75 | + @survey_question_result = SurveyQuestionResult.find(params[:id]) |
| 76 | + @survey_question_result.destroy |
| 77 | + |
| 78 | + respond_to do |format| |
| 79 | + format.html { redirect_to(survey_question_results_url) } |
| 80 | + format.xml { head :ok } |
| 81 | + end |
| 82 | + end |
| 83 | +end |
0 commit comments