Sha256: 6f0bf1bdfcabe8d68828a2feba3a29edefeb7743ac341a1e9c8135f732081dfd

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

<h1>New <%= singular_name %></h1>

<%% form_for(@<%= singular_name %>) do |f| %>
  <%%= f.error_messages %>
<%- for attribute in attributes -%>
  <p>
    <%%= f.label :<%= attribute.name %> %><br />
<%- if auto_complete_attributes.include? attribute.name -%>
    <%%= text_field_with_auto_complete :<%= singular_name %>, :<%= attribute.name %>, {}, { :method => :get } %>
<%- else -%>
    <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
<%- end -%>
  </p>
<%- end -%>
  <p>
    <%%= f.submit 'Create' %>
  </p>
<%% end %>

<%%= link_to 'Back', <%= plural_name %>_path %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
view_mapper-0.3.4 lib/view_mapper/views/auto_complete/templates/view_new.html.erb
view_mapper-0.3.3 lib/view_mapper/views/auto_complete/templates/view_new.html.erb
view_mapper-0.3.2 lib/view_mapper/views/auto_complete/templates/view_new.html.erb
view_mapper-0.3.1 lib/view_mapper/views/auto_complete/templates/view_new.html.erb