Sha256: fd4986dba15adb8ce240b9ce0780f4fcb2a40d83a0e68976a22bc55c3fae056d

Contents?: true

Size: 1.05 KB

Versions: 36

Compression:

Stored size: 1.05 KB

Contents

<%%= form_for <%= item_path :instance_variable => true %> do |f| %>


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

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



<table class="condensed-table">
  <%- for attribute in model_attributes -%>
      <tr>
        <td><%%= f.label :<%= attribute.name %> %></td>
        <%- if attribute.name.match('_id') %>
        <td><%%= f.select :<%= attribute.name %>,<%= attribute.name.split('_')[0].capitalize %>.all.collect{|var|[var.name,var.id]} %></td>

            <%else %>
        <td><%%= f.<%= attribute.field_type %> :<%= attribute.name %> %></td>
            <% end %>
      </tr>

  <%- end -%>
</table>
<br>
<br>

<%%= f.submit "Submit" ,:style=>"margin:auto",:class=>"btn primary large"%>

<%% end %>

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
thesilverspoon-1.0.2 lib/templates/views/erb/_form.html.erb
thesilverspoon-1.0.1 lib/templates/views/erb/_form.html.erb
thesilverspoon-1.0.0 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.35 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.34 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.33 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.32 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.31 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.30 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.29 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.28 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.27 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.26 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.25 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.24 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.23 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.22 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.21 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.20 lib/templates/views/erb/_form.html.erb
thesilverspoon-0.0.19 lib/templates/views/erb/_form.html.erb