<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">
          <label for="<%= key %>" class="col-sm-2 control-label">
            <%= resource_class.human_attribute_name key %>
          </label>
          <div class="col-sm-10">
            <input type="text" class="form-control" id="<%= key %>"
              placeholder="<%= resource_class.human_attribute_name key %>"
              value="<%= val %>">
          </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>

<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>

Use Rails' form helpers to create resource form
Use Rails' form helpers to create resource form

Cause, you know, paramters must be passed correctly and everything.
