Skip to content

Instantly share code, notes, and snippets.

@baileylo
Created October 7, 2010 18:11
Show Gist options
  • Select an option

  • Save baileylo/615569 to your computer and use it in GitHub Desktop.

Select an option

Save baileylo/615569 to your computer and use it in GitHub Desktop.
<%= form_for(@conversation) 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>
<div class="field">
<%= f.label :board_id %><br />
<%= collection_select(:conversation, :board_id, Board.all, :id, :name, :prompt => true) %>
</div>
<div clas="field">
<%= f.label :body %><br />
<%= text_area(@comments, :body, :size => "60x10")%>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment