Sha256: 3c2f8e5219cadd0750ef3247e7db67ab48e097b9bfd7acc991ff95ac25b5fcb3

Contents?: true

Size: 548 Bytes

Versions: 3

Compression:

Stored size: 548 Bytes

Contents

<%= form_for @person do |f| %>
    <div class='field<%= ' field-errors' if @person.errors[:name].any? %>'>
        <%= f.label :name, 'Name' %>
        <%= f.text_field :name, placeholder: 'Name' %>

        <% if @person.errors[:name].any? %>
            <p><%= @person.errors[:name].first %></p>
        <% end %>
    </div>

    <%= f.field :name do |name| %>
        <%= name.label 'Name' %>
        <%= name.text 'Name' %>
        <% if name.errors.any? %>
            <p><%= name.errors.first %></p>
        <% end %>
    <% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
formgroups-rails-0.0.4 test/dummy/app/views/home/index.html.erb
formgroups-rails-0.0.3 test/dummy/app/views/home/index.html.erb
formgroups-rails-0.0.2 test/dummy/app/views/home/index.html.erb