view app/views/pastes/_form.html.erb @ 33:58c6d46c3e97

More thing in bootstrap.
author Edho Arief <edho@myconan.net>
date Mon, 10 Sep 2012 15:20:32 +0700
parents 5cfc0b956083
children e09a3be8dd14
line wrap: on
line source

<%= form_for(@paste) do |f| %>
  <% if @paste.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@paste.errors.count, "error") %> prohibited this paste from being saved:</h2>

      <ul>
      <% @paste.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.text_area :paste, :class => 'span12', :cols => nil, :rows => nil %>
  </div>
  <div class="form-actions">
    <%= f.submit :class => 'btn btn-primary' %>
  </div>
<% end %>