Skip to content

Instantly share code, notes, and snippets.

@baileylo
Created October 19, 2010 08:37
Show Gist options
  • Save baileylo/633846 to your computer and use it in GitHub Desktop.
Save baileylo/633846 to your computer and use it in GitHub Desktop.
Included template view for replying to conversations
<%= form_for(@comment, :url => reply_board_conversation_url(:board_id=>@board, :id=>@conversation)) do |f| %>
<% if @comment.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@comment.errors.count, "error") %> prohibited this reply from being saved:</h2>
<ul>
<% @comment.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :body %><br />
<%= f.text_area(:body, :size => "60x10")%>
</div>
<div class="actions">
<%= f.submit(:value => "Create Reply")%>
</div>
<% end %>
<h1 id="page_title">Reply To <%= @conversation.title %></h1>
<%= link_to @board.title, @board %>
<%= render 'reply_form' %>
<%= link_to @board.title, @board %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment