Sha256: 0b9ae3949e0d56fa5058d94b45c68f7eda0bce4c19ef9adfe8131d176b30dde1

Contents?: true

Size: 721 Bytes

Versions: 9

Compression:

Stored size: 721 Bytes

Contents

<%%= simple_form_for(@<%= singular_table_name %>, class: "ui form") do |f| %>
  <%% if @<%= singular_table_name %>.errors.any? %>
    <div id="error_explanation">
      <h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
      <ul>
      <%% <%= singular_table_name %>.errors.full_messages.each do |message| %>
        <li><%%= message %></li>
      <%% end %>
      </ul>
    </div>
  <%% end %>
  <%- attributes.each do |attribute| -%>
    <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
  <%- end -%>
  <div class="actions">
    <%%= f.button :submit, class: 'ui button' %>
  </div>
<%% end %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
semantic_ui_views_generator-0.0.9 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.8 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.7 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.6 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.5 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.4 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.3 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.2 lib/generators/semantic/templates/simple_form/_form.html.erb
semantic_ui_views_generator-0.0.1 lib/generators/semantic/templates/simple_form/_form.html.erb