Sha256: 380ad2f6bf8b366fc09b9375c14396a9d7df4965a2c403475318a398e2f53ae7

Contents?: true

Size: 685 Bytes

Versions: 11

Compression:

Stored size: 685 Bytes

Contents

<h1>Editing <%= human_name.titleize %> #<%%= @<%= singular_table_name %>.id %></h1>

<% if named_routes? %>
<%%= form_tag(<%= singular_table_name %>_url(@<%= singular_table_name %>), method: 'patch') do %>
<% else %>
<%%= form_tag("/<%= plural_name %>/#{<%= singular_table_name %>.id}", method: 'patch') do %>
<% end %>
  <% attributes.each do |attribute| -%>
<div>
    <%%= label_tag :<%= attribute.name %> %><br />
    <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %><%= "?" if attribute.type == :boolean %> %>
  </div>

  <% end %>
  <div>
    <%%= submit_tag "Update <%= human_name.titleize %>" %>
  </div>

<%% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
starter_generators-0.9.4 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.9.3 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.9.2 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.9.1 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.9.0 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.8.0 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.7.3 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.7.2 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.7.1 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.7.0 lib/generators/starter/resource/templates/edit.html.erb
starter_generators-0.6.0 lib/generators/starter/resource/templates/edit.html.erb