Sha256: 30fc8ca2a92b555b09d0619a44282186be43f0effbbdd7784d2fda0dd9a6cc36

Contents?: true

Size: 929 Bytes

Versions: 1

Compression:

Stored size: 929 Bytes

Contents

<div class="row">
  <div class="col-xs-12">
    <%= form_for [ :admin, resource ], html: { class: 'form-horizontal' } do |form| %>
      <%
        attributes = resource.attributes.delete_if do |k, v|
          k.to_sym.in? [ :id, :created_at, :updated_at ]
        end
      %>
      <% attributes.each do |key, val| %>
        <div class="form-group">
          <%= form.label key, class: "col-sm-2 control-label" %>
          <div class="col-sm-10">
            <%= form.text_field key, class: "form-control",
              placeholder: resource_class.human_attribute_name(key) %>
          </div>
        </div>
      <% end %>

      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit" class="btn btn-primary">Submit</button>
          <%= link_to "Cancel", [ :admin, resource_class ], class: "btn btn-danger" %>
        </div>
      </div>
    <% end %>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyper_admin-0.2.0 app/views/admin/resources/_form.html.erb