security, user index
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
<%= form_for(@comment) do |f| %>
|
||||
<% if @comment.errors.any? %>
|
||||
<div id="error_explanation">
|
||||
<h2><%= pluralize(@comment.errors.count, "error") %> prohibited this comment from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @comment.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<h1>Editing comment</h1>
|
||||
<h1>Edit comment</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @comment %> |
|
||||
<%= link_to 'Back', comments_path %>
|
||||
<%= simple_form_for [@comment.blogpost, @comment] do |f| %>
|
||||
<%= f.input :text, :label => false, :as => "text", :placeholder => "Comment" %>
|
||||
<%= f.submit %>
|
||||
<% end %>
|
||||
@@ -1,21 +0,0 @@
|
||||
<h1>Listing comments</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @comments.each do |comment| %>
|
||||
<tr>
|
||||
<td><%= link_to 'Show', comment %></td>
|
||||
<td><%= link_to 'Edit', edit_comment_path(comment) %></td>
|
||||
<td><%= link_to 'Destroy', comment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Comment', new_comment_path %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<h1>New comment</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', comments_path %>
|
||||
@@ -1,5 +0,0 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_comment_path(@comment) %> |
|
||||
<%= link_to 'Back', comments_path %>
|
||||
Reference in New Issue
Block a user