diff --git a/app/controllers/survey/answers_controller.rb b/app/controllers/survey/answers_controller.rb deleted file mode 100644 index 5ddd8a5..0000000 --- a/app/controllers/survey/answers_controller.rb +++ /dev/null @@ -1,85 +0,0 @@ -class Survey::AnswersController < ApplicationController - # GET /survey/answers - # GET /survey/answers.json - load_and_authorize_resource - - def index - @survey_answers = Survey::Answer.all - - respond_to do |format| - format.html # index.html.erb - format.json { render json: @survey_answers } - end - end - - # GET /survey/answers/1 - # GET /survey/answers/1.json - def show - @survey_answer = Survey::Answer.find(params[:id]) - - respond_to do |format| - format.html # show.html.erb - format.json { render json: @survey_answer } - end - end - - # GET /survey/answers/new - # GET /survey/answers/new.json - def new - @survey_answer = Survey::Answer.new - - respond_to do |format| - format.html # new.html.erb - format.json { render json: @survey_answer } - end - end - - # GET /survey/answers/1/edit - def edit - @survey_answer = Survey::Answer.find(params[:id]) - end - - # POST /survey/answers - # POST /survey/answers.json - def create - @survey_answer = Survey::Answer.new(params[:survey_answer]) - - respond_to do |format| - if @survey_answer.save - format.html { redirect_to @survey_answer, notice: 'Answer was successfully created.' } - format.json { render json: @survey_answer, status: :created, location: @survey_answer } - else - format.html { render action: "new" } - format.json { render json: @survey_answer.errors, status: :unprocessable_entity } - end - end - end - - # PUT /survey/answers/1 - # PUT /survey/answers/1.json - def update - @survey_answer = Survey::Answer.find(params[:id]) - - respond_to do |format| - if @survey_answer.update_attributes(params[:survey_answer]) - format.html { redirect_to @survey_answer, notice: 'Answer was successfully updated.' } - format.json { head :no_content } - else - format.html { render action: "edit" } - format.json { render json: @survey_answer.errors, status: :unprocessable_entity } - end - end - end - - # DELETE /survey/answers/1 - # DELETE /survey/answers/1.json - def destroy - @survey_answer = Survey::Answer.find(params[:id]) - @survey_answer.destroy - - respond_to do |format| - format.html { redirect_to survey_answers_url } - format.json { head :no_content } - end - end -end diff --git a/app/views/comments/edit.html.erb b/app/views/comments/edit.html.erb deleted file mode 100644 index ba1980e..0000000 --- a/app/views/comments/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
<%= notice %>
- -<%= render @comment %> - -<%= link_to 'Edit', edit_comment_path(@comment) %> | -<%= link_to 'Back', comments_path %> diff --git a/app/views/survey/answers/_form.html.erb b/app/views/survey/answers/_form.html.erb deleted file mode 100644 index b115e0a..0000000 --- a/app/views/survey/answers/_form.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<%= semantic_form_for @answer do |f| %> - <%= f.inputs do %> - <%= f.input :choice %> - <%= f.input :user %> - <% end %> - - <%= f.actions do %> - <%= f.action :submit, :as => :input %> - <% end %> -<% end %> diff --git a/app/views/survey/answers/edit.html.erb b/app/views/survey/answers/edit.html.erb deleted file mode 100644 index 36e125d..0000000 --- a/app/views/survey/answers/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -| Choice | -User | -- | - | - |
|---|---|---|---|---|
| <%= survey_answer.choice %> | -<%= survey_answer.user %> | -<%= link_to 'Show', survey_answer %> | -<%= link_to 'Edit', edit_survey_answer_path(survey_answer) %> | -<%= link_to 'Destroy', survey_answer, method: :delete, data: { confirm: 'Are you sure?' } %> | -
<%= notice %>
- -- Choice: - <%= @survey_answer.choice %> -
- -- User: - <%= @survey_answer.user %> -
- - -<%= link_to 'Edit', edit_survey_answer_path(@survey_answer) %> | -<%= link_to 'Back', survey_answers_path %>