From cb73bbfa436304a3cf28dce521293c439c6cf562 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Fri, 7 Aug 2015 17:21:49 +0200 Subject: [PATCH] =?UTF-8?q?l=C3=B6sche=20unn=C3=B6tiges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/survey/answers_controller.rb | 85 -------------------- app/views/comments/edit.html.erb | 6 -- app/views/comments/new.html.erb | 5 -- app/views/comments/show.html.erb | 6 -- app/views/survey/answers/_form.html.erb | 10 --- app/views/survey/answers/edit.html.erb | 6 -- app/views/survey/answers/index.html.erb | 25 ------ app/views/survey/answers/new.html.erb | 5 -- app/views/survey/answers/show.html.erb | 15 ---- 9 files changed, 163 deletions(-) delete mode 100644 app/controllers/survey/answers_controller.rb delete mode 100644 app/views/comments/edit.html.erb delete mode 100644 app/views/comments/new.html.erb delete mode 100644 app/views/comments/show.html.erb delete mode 100644 app/views/survey/answers/_form.html.erb delete mode 100644 app/views/survey/answers/edit.html.erb delete mode 100644 app/views/survey/answers/index.html.erb delete mode 100644 app/views/survey/answers/new.html.erb delete mode 100644 app/views/survey/answers/show.html.erb 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 @@ -

Editing comment

- -<%= render 'form', object: @comment %> - -<%= link_to 'Show', @comment %> | -<%= link_to 'Back', comments_path %> diff --git a/app/views/comments/new.html.erb b/app/views/comments/new.html.erb deleted file mode 100644 index 4d10894..0000000 --- a/app/views/comments/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New comment

- -<%= render partial: 'form', object: @comment %> - -<%= link_to 'Back', comments_path %> diff --git a/app/views/comments/show.html.erb b/app/views/comments/show.html.erb deleted file mode 100644 index a0e0552..0000000 --- a/app/views/comments/show.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 @@ -

Editing survey_answer

- -<%= render 'form' %> - -<%= link_to 'Show', @survey_answer %> | -<%= link_to 'Back', survey_answers_path %> diff --git a/app/views/survey/answers/index.html.erb b/app/views/survey/answers/index.html.erb deleted file mode 100644 index f2c5eee..0000000 --- a/app/views/survey/answers/index.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -

Listing survey_answers

- - - - - - - - - - -<% @survey_answers.each do |survey_answer| %> - - - - - - - -<% end %> -
ChoiceUser
<%= 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?' } %>
- -
- -<%= link_to 'New Answer', new_survey_answer_path %> diff --git a/app/views/survey/answers/new.html.erb b/app/views/survey/answers/new.html.erb deleted file mode 100644 index 9f35966..0000000 --- a/app/views/survey/answers/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

New survey_answer

- -<%= render 'form' %> - -<%= link_to 'Back', survey_answers_path %> diff --git a/app/views/survey/answers/show.html.erb b/app/views/survey/answers/show.html.erb deleted file mode 100644 index 741d702..0000000 --- a/app/views/survey/answers/show.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

<%= notice %>

- -

- Choice: - <%= @survey_answer.choice %> -

- -

- User: - <%= @survey_answer.user %> -

- - -<%= link_to 'Edit', edit_survey_answer_path(@survey_answer) %> | -<%= link_to 'Back', survey_answers_path %>