Created
October 19, 2010 08:40
-
-
Save baileylo/633849 to your computer and use it in GitHub Desktop.
Code to display conversations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(@conversation, :url => board_conversations_path) do |f| %> | |
<% if @conversation.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@conversation.errors.count, "error") %> prohibited this conversation from being saved:</h2> | |
<ul> | |
<% @conversation.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<div class="field"> | |
<%= f.label :title %><br /> | |
<%= f.text_field :title %> | |
</div> | |
<%= fields_for(@comment) do |cf|%> | |
<div class="field"> | |
<%= cf.label :body %><br /> | |
<%= cf.text_area(:body, :size => "60x10")%> | |
</div> | |
<% end %> | |
<div class="actions"> | |
<%= f.submit :as => "Create Post"%> | |
</div> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 id="page_title">New conversation</h1> | |
<%= link_to @board.title, @board %> | |
<%= render 'form' %> | |
<%= link_to @board.title, @board %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment