Sha256: b289e6a3e030e6b81731f5ed8399473022468b933c0660492387a65c646f9c2d

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

<%%= semantic_form_for([:admin,@<%= singular_table_name %>], :html => {:multipart => true}) 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 |msg| %>
            <li><%%= msg %></li>
          <%% end %>
          </ul>
        </div>
    <%% end %>
    <%%= f.inputs do %>
        <% for attribute in attributes -%>
            <% unless attribute.type == :text %>
        <%%= f.input :<%= attribute.name %>, :label => '<%= attribute.name %>' %>
            <% else %>
        <%%= f.input :<%= attribute.name %>, :label => '<%= attribute.name %>', :input_html => {:class => 'html_editor'} %>
            <% end -%>
        <% end %>
    <%% end %>
  
  <hr />
  <div class="submit">
    <%%= f.buttons do %>
        <%%= f.commit_button 'Submit',  :button_html => {:class => 'submit_button'} %>
    <%% end %>
  </div>

<%% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cable-0.8.6 lib/generators/cable/resource/templates/erb/scaffold/_form.html.erb
cable-0.8.5 lib/generators/cable/resource/templates/erb/scaffold/_form.html.erb
cable-0.8.4 lib/generators/cable/resource/templates/erb/scaffold/_form.html.erb