forked from bofh/fetsite
AutoCommit Don Jul 30 00:03:02 CEST 2015
This commit is contained in:
10
app/views/survey/answers/_form.html.erb
Normal file
10
app/views/survey/answers/_form.html.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
<%= 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 %>
|
||||
6
app/views/survey/answers/edit.html.erb
Normal file
6
app/views/survey/answers/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing survey_answer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @survey_answer %> |
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
25
app/views/survey/answers/index.html.erb
Normal file
25
app/views/survey/answers/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<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 %>
|
||||
5
app/views/survey/answers/new.html.erb
Normal file
5
app/views/survey/answers/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New survey_answer</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', survey_answers_path %>
|
||||
15
app/views/survey/answers/show.html.erb
Normal file
15
app/views/survey/answers/show.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<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