<h1>Editing comment by <%= @comment.author_name || 'Anonymous' %></h1>

<%= form_for([:admin, @comment], :html => { :class => '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="para"><%= f.text_area :content %></div>
  
  <div class="para actions">
    <%= f.submit :class => 'primary button' %>
    <%= button_link_to 'Cancel', session[:return_to] || admin_comments_path %>
  </div>
  
  <div class="para preview">
    <h3>Preview</h3>
    <div class="content">
      <%= render_markdown(@comment.content) %>
    </div>
  </div>
<% end %>

<h1>Editing comment by <%= @comment.author_name || 'Anonymous' %></h1>

<%= form_for([:admin, @comment], :html => { :class => '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="para">
    <%= f.label :author_name %><br />
    <%= f.text_field :author_name %>
  </div>

  <div class="para">
    <%= f.label :author_email %><br />
    <%= f.text_field :author_email %>
  </div>
  
  <div class="para">
    <%= f.label :content %><br />
    <%= f.text_area :content %>
  </div>
  
  <div class="para actions">
    <%= f.submit :class => 'primary button' %>
    <%= button_link_to 'Cancel', session[:return_to] || admin_comments_path %>
  </div>
  
  <div class="para preview">
    <h3>Preview</h3>
    <div class="content">
      <%= render_markdown(@comment.content) %>
    </div>
  </div>
<% end %>

Allow editing comments' author name and author email from the admin panel
Allow editing comments' author name and author email from the admin panel
