Sha256: b9c2bc8c0ba2b73503ada89fd4f1fe67bcbcb44ed2b98e83fd2fe20a66b31bce

Contents?: true

Size: 1.07 KB

Versions: 26

Compression:

Stored size: 1.07 KB

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 />
<% if attribute.field_type == :date_select || attribute.field_type == :time_select || attribute.field_type == :datetime_select -%>
    <%%= text_field_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %> %>
<% elsif attribute.field_type == :check_box -%>
    <%%= check_box_tag :<%= attribute.name %>, 1, @<%= singular_table_name %>.<%= attribute.name %>? %>
<% else -%>
    <%%= <%= attribute.field_type %>_tag :<%= attribute.name %>, @<%= singular_table_name %>.<%= attribute.name %><%= "?" if attribute.type == :boolean %> %>
<% end -%>
  </div>

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

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
ez-1.3.0 lib/generators/ez/resource/templates/edit.html.erb
ez-1.2.0 lib/generators/ez/resource/templates/edit.html.erb
ez-1.1.3 lib/generators/ez/resource/templates/edit.html.erb
ez-1.1.2 lib/generators/ez/resource/templates/edit.html.erb
ez-1.1.1 lib/generators/ez/resource/templates/edit.html.erb
ez-1.1.0 lib/generators/ez/resource/templates/edit.html.erb
ez-1.0.0 lib/generators/ez/resource/templates/edit.html.erb
ez-0.9.9 lib/generators/ez/resource/templates/edit.html.erb
ez-0.9.7 lib/generators/ez/resource/templates/edit.html.erb
ez-0.9.6 lib/generators/ez/resource/templates/edit.html.erb
ez-0.9.5 lib/generators/ez/resource/templates/edit.html.erb
ez-0.9.1 lib/generators/ez/resource/templates/edit.html.erb
ez-0.9.0 lib/generators/ez/resource/templates/edit.html.erb
ez-0.8.7 lib/generators/ez/resource/templates/edit.html.erb
ez-0.8.6 lib/generators/ez/resource/templates/edit.html.erb
ez-0.7.0 lib/generators/ez/resource/templates/edit.html.erb
ez-0.6.5 lib/generators/ez/resource/templates/edit.html.erb
ez-0.6.4 lib/generators/ez/resource/templates/edit.html.erb
ez-0.6.3 lib/generators/ez/resource/templates/edit.html.erb
ez-0.6.2 lib/generators/ez/resource/templates/edit.html.erb