Sha256: 03851f102e837ac465a7de50b7259618c7d41dbea706796d9810e4812b466f86

Contents?: true

Size: 617 Bytes

Versions: 12

Compression:

Stored size: 617 Bytes

Contents

<h1>New <%= human_name.titleize %></h1>

<% if named_routes? %>
<%%= form_tag(<%= plural_name %>_url, method: 'post') do %>
<% else %>
<%%= form_tag('/<%= plural_name %>', method: 'post') do %>
<% end %>

<% attributes.each do |attribute| -%>
  <div>
    <%%= label_tag :<%= attribute.name %> %><br />
<% if attribute.field_type == 'date' -%>
    <%%= text_field_tag <%= attribute.name %> %>
<% end -%>
    <%%= <%= attribute.field_type %>_tag :<%= attribute.name %><%= "?" if attribute.type == :boolean %> %>
  </div>

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

Version data entries

12 entries across 12 versions & 1 rubygems

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