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