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