Skip to content

Instantly share code, notes, and snippets.

@deepj
Created November 1, 2011 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepj/1331295 to your computer and use it in GitHub Desktop.
Save deepj/1331295 to your computer and use it in GitHub Desktop.
workshop
<h2>New project</h2>
<% if @project.errors.any? %>
<ul>
<% @project.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
<% end %>
<%= form_for @project do |form| %>
<%= form.label :title %><br/>
<div class="input">
<%= form.text_field :title %>
</div>
<%= form.label :description %><br/>
<div class="input">
<%= form.text_area :description %>
</div>
<%= form.submit 'Create project', class: 'btn primary' %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment