app/views/administrate/application/_form.html.erb in administrate-0.1.2 vs app/views/administrate/application/_form.html.erb in administrate-0.1.3
- old
+ new
@@ -12,11 +12,11 @@
and knows which attributes should be displayed in the resource's form.
[1]: http://www.rubydoc.info/gems/administrate/Administrate/Page/Form
%>
-<%= form_for([Administrate::NAMESPACE, page.resource], html: { class: "form" }) do |f| %>
+<%= form_for([namespace, page.resource], html: { class: "form" }) do |f| %>
<% if page.resource.errors.any? %>
<div id="error_explanation">
<h2>
<%= pluralize(page.resource.errors.count, "error") %>
prohibited this <%= page.resource_name %> from being saved:
@@ -28,16 +28,14 @@
<% end %>
</ul>
</div>
<% end %>
- <div class="form-inputs">
- <% page.attributes.each do |attribute| -%>
- <div class="form-field form-field--<%= attribute.html_class %>">
- <%= render_field attribute, f: f %>
- </div>
- <% end -%>
- </div>
+ <% page.attributes.each do |attribute| -%>
+ <div class="field-unit field-unit--<%= attribute.html_class %>">
+ <%= render_field attribute, f: f %>
+ </div>
+ <% end -%>
<div class="form-actions">
<%= f.submit %>
</div>
<% end %>