lösche unnötiges
This commit is contained in:
@@ -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
|
||||
@@ -1,6 +0,0 @@
|
||||
<h1>Editing comment</h1>
|
||||
|
||||
<%= render 'form', object: @comment %>
|
||||
|
||||
<%= link_to 'Show', @comment %> |
|
||||
<%= link_to 'Back', comments_path %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<h1>New comment</h1>
|
||||
|
||||
<%= render partial: 'form', object: @comment %>
|
||||
|
||||
<%= link_to 'Back', comments_path %>
|
||||
@@ -1,6 +0,0 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= render @comment %>
|
||||
|
||||
<%= link_to 'Edit', edit_comment_path(@comment) %> |
|
||||
<%= link_to 'Back', comments_path %>
|
||||
@@ -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 %>
|
||||
@@ -1,6 +0,0 @@
|
||||
<h1>Editing survey_answer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @survey_answer %> |
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
@@ -1,25 +0,0 @@
|
||||
<h1>Listing survey_answers</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Choice</th>
|
||||
<th>User</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @survey_answers.each do |survey_answer| %>
|
||||
<tr>
|
||||
<td><%= survey_answer.choice %></td>
|
||||
<td><%= survey_answer.user %></td>
|
||||
<td><%= link_to 'Show', survey_answer %></td>
|
||||
<td><%= link_to 'Edit', edit_survey_answer_path(survey_answer) %></td>
|
||||
<td><%= link_to 'Destroy', survey_answer, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Answer', new_survey_answer_path %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<h1>New survey_answer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
@@ -1,15 +0,0 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Choice:</b>
|
||||
<%= @survey_answer.choice %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>User:</b>
|
||||
<%= @survey_answer.user %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_survey_answer_path(@survey_answer) %> |
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
Reference in New Issue
Block a user