draft_generators 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/draft_generators.gemspec +1 -1
  4. data/lib/generators/draft/account/templates/controllers/authentication_controller.rb +12 -12
  5. data/lib/generators/draft/account/templates/views/authentication/edit_profile.html.erb +10 -10
  6. data/lib/generators/draft/account/templates/views/authentication/edit_profile_with_errors.html.erb +10 -10
  7. data/lib/generators/draft/account/templates/views/authentication/sign_in.html.erb +4 -4
  8. data/lib/generators/draft/account/templates/views/authentication/sign_up.html.erb +12 -12
  9. data/lib/generators/draft/resource/templates/controllers/controller.rb +6 -6
  10. data/lib/generators/draft/resource/templates/specs/crud_spec.rb +2 -2
  11. data/lib/generators/draft/resource/templates/views/association_new_form.html.erb +9 -9
  12. data/lib/generators/draft/resource/templates/views/create_row.html.erb +23 -10
  13. data/lib/generators/draft/resource/templates/views/destroy_row.html.erb +23 -10
  14. data/lib/generators/draft/resource/templates/views/edit_form.html.erb +44 -41
  15. data/lib/generators/draft/resource/templates/views/edit_form_with_errors.html.erb +46 -43
  16. data/lib/generators/draft/resource/templates/views/index.html.erb +30 -34
  17. data/lib/generators/draft/resource/templates/views/new_form.html.erb +44 -42
  18. data/lib/generators/draft/resource/templates/views/new_form_with_errors.html.erb +46 -44
  19. data/lib/generators/draft/resource/templates/views/show.html.erb +51 -50
  20. data/lib/generators/draft/resource/templates/views/update_row.html.erb +20 -7
  21. data/lib/generators/draft/scaffold/templates/_form.html.erb +2 -2
  22. metadata +2 -2
@@ -1,85 +1,88 @@
1
+ <nav aria-label="breadcrumb">
2
+ <ul>
3
+ <li><a href="/<%= plural_table_name %>"><%= plural_table_name.humanize %></a></li>
4
+ <li>Edit <%= singular_table_name.humanize.downcase %> #<%%= @<%= singular_table_name %>.id %></li>
5
+ </ul>
6
+ </nav>
7
+
1
8
  <% unless skip_validation_alerts? -%>
2
9
  <% if with_sentinels? -%>
3
10
  <!-- Validation failure messages -->
4
11
  <% end -%>
5
12
  <%% if @<%= singular_table_name %>.errors.any? %>
6
13
  <%% @<%= singular_table_name %>.errors.full_messages.each do |message| %>
7
- <div>
14
+ <div class="text-red-600">
8
15
  <%%= message %>
9
16
  </div>
10
17
  <%% end %>
11
18
  <%% end %>
12
19
 
13
20
  <% end -%>
14
- <h1>
15
- Edit <%= singular_table_name.humanize.downcase %> #<%%= @<%= singular_table_name %>.id %>
16
- </h1>
17
-
18
- <hr>
21
+ <div class="card">
22
+ <header>
23
+ <h1>
24
+ Edit <%= singular_table_name.humanize.downcase %> #<%%= @<%= singular_table_name %>.id %>
25
+ </h1>
26
+ </header>
19
27
 
20
28
  <% if with_sentinels? -%>
21
- <!-- Form <%= singular_table_name %> start -->
29
+ <!-- Form <%= singular_table_name %> start -->
22
30
  <% end -%>
23
- <form action="/update_<%= singular_table_name %>/<%%= @<%= singular_table_name %>.id %>"<% unless skip_post? -%> method="post"<% end -%>>
31
+ <form action="/update_<%= singular_table_name %>/<%%= @<%= singular_table_name %>.id %>"<% unless skip_post? -%> method="post"<% end -%>>
24
32
  <% if with_sentinels? -%>
25
- <!-- Form <%= singular_table_name %> end -->
33
+ <!-- Form <%= singular_table_name %> end -->
26
34
  <% end -%>
27
35
 
28
36
  <% attributes.each do |attribute| -%>
29
37
  <% if with_sentinels? -%>
30
- <!-- Label and input for <%= attribute.column_name %> start -->
38
+ <!-- Label and input for <%= attribute.column_name %> start -->
31
39
  <% end -%>
32
- <% if attribute.field_type == :check_box -%>
33
- <div>
34
- <input type="hidden" value="0" name="<%= attribute.column_name %>">
40
+ <% if [:check_box, :checkbox].include?(attribute.field_type) -%>
41
+ <div>
42
+ <input type="hidden" value="0" name="<%= attribute.column_name %>_param">
35
43
  <% if with_sentinels? -%>
36
- <!-- Input for <%= attribute.column_name %> start -->
44
+ <!-- Input for <%= attribute.column_name %> start -->
37
45
  <% end -%>
38
- <input id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" type="checkbox" value="1" <%%= "checked" if @<%= singular_table_name %>.<%= attribute.column_name %> %>>
46
+ <input id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" type="checkbox" value="1" <%%= "checked" if @<%= singular_table_name %>.<%= attribute.column_name %> %>>
39
47
  <% if with_sentinels? -%>
40
- <!-- Input for <%= attribute.column_name %> end -->
48
+ <!-- Input for <%= attribute.column_name %> end -->
41
49
  <% end -%>
42
- <label for="<%= attribute.column_name %>">
43
- <%= attribute.column_name.humanize %>
44
- </label>
45
- </div>
50
+ <label for="<%= attribute.column_name %>_field">
51
+ <%= attribute.column_name.humanize %>
52
+ </label>
53
+ </div>
46
54
  <% else -%>
47
- <div>
48
- <label for="<%= attribute.column_name %>">
49
- <%= attribute.column_name.humanize %>
50
- </label>
55
+ <div>
56
+ <label for="<%= attribute.column_name %>_field">
57
+ <%= attribute.column_name.humanize %>
58
+ </label>
51
59
 
52
- <% if attribute.field_type == :text_area -%>
60
+ <% if [:text_area, :textarea].include?(attribute.field_type) -%>
53
61
  <% if with_sentinels? -%>
54
- <!-- Input for <%= attribute.column_name %> start -->
62
+ <!-- Input for <%= attribute.column_name %> start -->
55
63
  <% end -%>
56
- <textarea id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" rows="3"><%%= @<%= singular_table_name %>.<%= attribute.column_name %> %></textarea>
64
+ <textarea id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" rows="3"><%%= @<%= singular_table_name %>.<%= attribute.column_name %> %></textarea>
57
65
  <% if with_sentinels? -%>
58
- <!-- Input for <%= attribute.column_name %> end -->
66
+ <!-- Input for <%= attribute.column_name %> end -->
59
67
  <% end -%>
60
68
  <% else -%>
61
69
  <% if with_sentinels? -%>
62
- <!-- Input for <%= attribute.column_name %> start -->
70
+ <!-- Input for <%= attribute.column_name %> start -->
63
71
  <% end -%>
64
- <input type="text" id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" value="<%%= @<%= singular_table_name %>.<%= attribute.column_name %> %>">
72
+ <input type="text" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" value="<%%= @<%= singular_table_name %>.<%= attribute.column_name %> %>">
65
73
  <% if with_sentinels? -%>
66
- <!-- Input for <%= attribute.column_name %> end -->
74
+ <!-- Input for <%= attribute.column_name %> end -->
67
75
  <% end -%>
68
76
  <% end -%>
69
- </div>
77
+ </div>
70
78
  <% if with_sentinels? -%>
71
- <!-- Label and input for <%= attribute.column_name %> end -->
79
+ <!-- Label and input for <%= attribute.column_name %> end -->
72
80
  <% end -%>
73
81
  <% end -%>
74
82
 
75
83
  <% end -%>
76
- <button>
77
- Update <%= singular_table_name.humanize.downcase %>
78
- </button>
79
- </form>
80
-
81
- <hr>
82
-
83
- <a href="/<%= plural_table_name %>">
84
- Go back
85
- </a>
84
+ <button type="submit">
85
+ Update <%= singular_table_name.humanize.downcase %>
86
+ </button>
87
+ </form>
88
+ </div>
@@ -1,10 +1,22 @@
1
- <h1>
2
- List of all <%= plural_table_name.humanize.downcase %>
3
- </h1>
1
+ <div class="card">
2
+ <header>
3
+ <h1>
4
+ List of all <%= plural_table_name.humanize.downcase %>
5
+ </h1>
6
+ </header>
4
7
 
5
- <hr>
8
+ <ul>
9
+ <%% @list_of_<%= plural_table_name %>.each do |<%= singular_table_name.indefinitize.gsub(" ", "_") %>| %>
10
+ <li>
11
+ <a href="/<%= plural_table_name.underscore %>/<%%= <%= singular_table_name.indefinitize.gsub(" ", "_") %>.id %>">
12
+ <%= singular_table_name.humanize %> #<%%= <%= singular_table_name.indefinitize.gsub(" ", "_") %>.id %>
13
+ </a>
14
+ </li>
15
+ <%% end %>
16
+ </ul>
17
+ </div>
6
18
 
7
- <article>
19
+ <div class="card">
8
20
  <header>
9
21
  <h2>
10
22
  Add a new <%= singular_table_name.humanize.downcase %>
@@ -13,31 +25,31 @@
13
25
 
14
26
  <form action="/insert_<%= singular_table_name %>"<% unless skip_post? -%> method="post"<% end -%>>
15
27
  <% attributes.each do |attribute| -%>
16
- <% if attribute.field_type == :check_box -%>
28
+ <% if [:check_box, :checkbox].include?(attribute.field_type) -%>
17
29
  <div>
18
- <input type="checkbox" id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>" value="1">
30
+ <input type="checkbox" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" value="1">
19
31
 
20
- <label for="<%= attribute.column_name %>_box"><%= attribute.column_name.humanize %></label>
32
+ <label for="<%= attribute.column_name %>_field"><%= attribute.column_name.humanize %></label>
21
33
  </div>
22
34
 
23
35
  <% else -%>
24
36
  <div>
25
- <label for="<%= attribute.column_name %>_box">
37
+ <label for="<%= attribute.column_name %>_field">
26
38
  <%= attribute.column_name.humanize %>
27
39
  </label>
28
40
 
29
- <% if attribute.field_type == :text_area -%>
30
- <textarea id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>" rows="3"></textarea>
41
+ <% if [:text_area, :textarea].include?(attribute.field_type) -%>
42
+ <textarea id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" rows="3"></textarea>
31
43
  <% elsif attribute.field_type.to_s.gsub(/_.*/, "").to_sym == :datetime -%>
32
- <input type="datetime-local" id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>">
44
+ <input type="datetime-local" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param">
33
45
  <% elsif attribute.field_type.to_s.gsub(/_.*/, "").to_sym == :date -%>
34
- <input type="date" id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>">
46
+ <input type="date" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param">
35
47
  <% elsif attribute.field_type.to_s.gsub(/_.*/, "").to_sym == :time -%>
36
- <input type="time" id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>">
37
- <% elsif attribute.field_type.to_s.gsub(/_.*/, "").to_sym == :integer -%>
38
- <input type="number" id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>">
48
+ <input type="time" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param">
49
+ <% elsif attribute.field_type.to_s.gsub(/_.*/, "").to_sym == :number -%>
50
+ <input type="number" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param">
39
51
  <% else -%>
40
- <input type="text" id="<%= attribute.column_name %>_box" name="query_<%= attribute.column_name %>">
52
+ <input type="text" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param">
41
53
  <% end -%>
42
54
  </div>
43
55
 
@@ -47,20 +59,4 @@
47
59
  Create <%= singular_table_name.humanize.downcase %>
48
60
  </button>
49
61
  </form>
50
- </article>
51
-
52
- <hr>
53
-
54
- <article>
55
- <ul>
56
- <%% @list_of_<%= plural_table_name %>.each do |<%= singular_table_name.indefinitize.gsub(" ", "_") %>| %>
57
- <li>
58
- <a href="/<%= plural_table_name.underscore %>/<%%= <%= singular_table_name.indefinitize.gsub(" ", "_") %>.id %>">
59
- <%= singular_table_name.humanize %> #<%%= <%= singular_table_name.indefinitize.gsub(" ", "_") %>.id %>
60
- </a>
61
- </li>
62
- <%% end %>
63
- </ul>
64
- </article>
65
-
66
- <hr>
62
+ </div>
@@ -1,73 +1,75 @@
1
- <h1>
2
- Add a new <%= singular_table_name.humanize.downcase %>
3
- </h1>
1
+ <nav aria-label="breadcrumb">
2
+ <ul>
3
+ <li><a href="/<%= plural_table_name %>"><%= plural_table_name.humanize %></a></li>
4
+ <li>New <%= singular_table_name.humanize.downcase %></li>
5
+ </ul>
6
+ </nav>
4
7
 
5
-
6
- <hr>
8
+ <div class="card">
9
+ <header>
10
+ <h1>
11
+ Add a new <%= singular_table_name.humanize.downcase %>
12
+ </h1>
13
+ </header>
7
14
 
8
15
  <% if with_sentinels? -%>
9
- <!-- Form <%= singular_table_name %> start -->
16
+ <!-- Form <%= singular_table_name %> start -->
10
17
  <% end -%>
11
- <form action="/create_<%= singular_table_name %>"<% unless skip_post? -%> method="post"<% end -%>>
18
+ <form action="/create_<%= singular_table_name %>"<% unless skip_post? -%> method="post"<% end -%>>
12
19
  <% if with_sentinels? -%>
13
- <!-- Form <%= singular_table_name %> end -->
20
+ <!-- Form <%= singular_table_name %> end -->
14
21
  <% end -%>
15
22
 
16
23
  <% attributes.each do |attribute| -%>
17
24
  <% if with_sentinels? -%>
18
- <!-- Label and input for <%= attribute.column_name %> start -->
25
+ <!-- Label and input for <%= attribute.column_name %> start -->
19
26
  <% end -%>
20
- <% if attribute.field_type == :check_box -%>
21
- <div>
22
- <input type="hidden" value="0" name="<%= attribute.column_name %>">
27
+ <% if [:check_box, :checkbox].include?(attribute.field_type) -%>
28
+ <div>
29
+ <input type="hidden" value="0" name="<%= attribute.column_name %>_param">
23
30
  <% if with_sentinels? -%>
24
- <!-- Input for <%= attribute.column_name %> start -->
31
+ <!-- Input for <%= attribute.column_name %> start -->
25
32
  <% end -%>
26
- <input id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" type="checkbox">
33
+ <input id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" type="checkbox">
27
34
  <% if with_sentinels? -%>
28
- <!-- Input for <%= attribute.column_name %> end -->
35
+ <!-- Input for <%= attribute.column_name %> end -->
29
36
  <% end -%>
30
- <label for="<%= attribute.column_name %>">
31
- <%= attribute.column_name.humanize %>
32
- </label>
33
- </div>
37
+ <label for="<%= attribute.column_name %>_field">
38
+ <%= attribute.column_name.humanize %>
39
+ </label>
40
+ </div>
34
41
  <% else -%>
35
- <div>
36
- <label for="<%= attribute.column_name %>">
37
- <%= attribute.column_name.humanize %>
38
- </label>
42
+ <div>
43
+ <label for="<%= attribute.column_name %>_field">
44
+ <%= attribute.column_name.humanize %>
45
+ </label>
39
46
 
40
- <% if attribute.field_type == :text_area -%>
47
+ <% if [:text_area, :textarea].include?(attribute.field_type) -%>
41
48
  <% if with_sentinels? -%>
42
- <!-- Input for <%= attribute.column_name %> start -->
49
+ <!-- Input for <%= attribute.column_name %> start -->
43
50
  <% end -%>
44
- <textarea id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" rows="3"></textarea>
51
+ <textarea id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" rows="3"></textarea>
45
52
  <% if with_sentinels? -%>
46
- <!-- Input for <%= attribute.column_name %> end -->
53
+ <!-- Input for <%= attribute.column_name %> end -->
47
54
  <% end -%>
48
55
  <% else -%>
49
56
  <% if with_sentinels? -%>
50
- <!-- Input for <%= attribute.column_name %> start -->
57
+ <!-- Input for <%= attribute.column_name %> start -->
51
58
  <% end -%>
52
- <input type="text" id="<%= attribute.column_name %>" name="<%= attribute.column_name %>">
59
+ <input type="text" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param">
53
60
  <% if with_sentinels? -%>
54
- <!-- Input for <%= attribute.column_name %> end -->
61
+ <!-- Input for <%= attribute.column_name %> end -->
55
62
  <% end -%>
56
63
  <% end -%>
57
- </div>
64
+ </div>
58
65
  <% if with_sentinels? -%>
59
- <!-- Label and input for <%= attribute.column_name %> end -->
66
+ <!-- Label and input for <%= attribute.column_name %> end -->
60
67
  <% end -%>
61
68
  <% end -%>
62
69
 
63
70
  <% end -%>
64
- <button>
65
- Create <%= singular_table_name.humanize.downcase %>
66
- </button>
67
- </form>
68
-
69
- <hr>
70
-
71
- <a href="/<%= plural_table_name %>">
72
- Go back
73
- </a>
71
+ <button type="submit">
72
+ Create <%= singular_table_name.humanize.downcase %>
73
+ </button>
74
+ </form>
75
+ </div>
@@ -1,9 +1,16 @@
1
+ <nav aria-label="breadcrumb">
2
+ <ul>
3
+ <li><a href="/<%= plural_table_name %>"><%= plural_table_name.humanize %></a></li>
4
+ <li>New <%= singular_table_name.humanize.downcase %></li>
5
+ </ul>
6
+ </nav>
7
+
1
8
  <% unless skip_validation_alerts? -%>
2
9
  <!-- Validation failure messages -->
3
10
  <%% if @<%= singular_table_name %>.present? %>
4
11
  <%% if @<%= singular_table_name %>.errors.any? %>
5
12
  <%% @<%= singular_table_name %>.errors.full_messages.each do |message| %>
6
- <div>
13
+ <div class="text-red-600">
7
14
  <%%= message %>
8
15
  </div>
9
16
  <%% end %>
@@ -11,76 +18,71 @@
11
18
  <%% end %>
12
19
 
13
20
  <% end -%>
14
- <h1>
15
- Add a new <%= singular_table_name.humanize.downcase %>
16
- </h1>
17
-
18
-
19
- <hr>
21
+ <div class="card">
22
+ <header>
23
+ <h1>
24
+ Add a new <%= singular_table_name.humanize.downcase %>
25
+ </h1>
26
+ </header>
20
27
 
21
28
  <% if with_sentinels? -%>
22
- <!-- Form <%= singular_table_name %> start -->
29
+ <!-- Form <%= singular_table_name %> start -->
23
30
  <% end -%>
24
- <form action="/create_<%= singular_table_name %>"<% unless skip_post? -%> method="post"<% end -%>>
31
+ <form action="/create_<%= singular_table_name %>"<% unless skip_post? -%> method="post"<% end -%>>
25
32
  <% if with_sentinels? -%>
26
- <!-- Form <%= singular_table_name %> end -->
33
+ <!-- Form <%= singular_table_name %> end -->
27
34
  <% end -%>
28
35
 
29
36
  <% attributes.each do |attribute| -%>
30
37
  <% if with_sentinels? -%>
31
- <!-- Label and input for <%= attribute.column_name %> start -->
38
+ <!-- Label and input for <%= attribute.column_name %> start -->
32
39
  <% end -%>
33
- <% if attribute.field_type == :check_box -%>
34
- <div>
35
- <input type="hidden" value="0" name="<%= attribute.column_name %>">
40
+ <% if [:check_box, :checkbox].include?(attribute.field_type) -%>
41
+ <div>
42
+ <input type="hidden" value="0" name="<%= attribute.column_name %>_param">
36
43
  <% if with_sentinels? -%>
37
- <!-- Input for <%= attribute.column_name %> start -->
44
+ <!-- Input for <%= attribute.column_name %> start -->
38
45
  <% end -%>
39
- <input id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" type="checkbox" <% unless skip_validation_alerts? -%><%%= "checked" if @<%= singular_table_name %>.<%= attribute.column_name %> %><% end -%>>
46
+ <input id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" type="checkbox" <% unless skip_validation_alerts? -%><%%= "checked" if @<%= singular_table_name %>.<%= attribute.column_name %> %><% end -%>>
40
47
  <% if with_sentinels? -%>
41
- <!-- Input for <%= attribute.column_name %> end -->
48
+ <!-- Input for <%= attribute.column_name %> end -->
42
49
  <% end -%>
43
- <label for="<%= attribute.column_name %>">
44
- <%= attribute.column_name.humanize %>
45
- </label>
46
- </div>
50
+ <label for="<%= attribute.column_name %>_field">
51
+ <%= attribute.column_name.humanize %>
52
+ </label>
53
+ </div>
47
54
  <% else -%>
48
- <div>
49
- <label for="<%= attribute.column_name %>">
50
- <%= attribute.column_name.humanize %>
51
- </label>
55
+ <div>
56
+ <label for="<%= attribute.column_name %>_field">
57
+ <%= attribute.column_name.humanize %>
58
+ </label>
52
59
 
53
- <% if attribute.field_type == :text_area -%>
60
+ <% if [:text_area, :textarea].include?(attribute.field_type) -%>
54
61
  <% if with_sentinels? -%>
55
- <!-- Input for <%= attribute.column_name %> start -->
62
+ <!-- Input for <%= attribute.column_name %> start -->
56
63
  <% end -%>
57
- <textarea id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" rows="3"><% unless skip_validation_alerts? -%><%%= @<%= singular_table_name %>.<%= attribute.column_name %> %><% end -%></textarea>
64
+ <textarea id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" rows="3"><% unless skip_validation_alerts? -%><%%= @<%= singular_table_name %>.<%= attribute.column_name %> %><% end -%></textarea>
58
65
  <% if with_sentinels? -%>
59
- <!-- Input for <%= attribute.column_name %> end -->
66
+ <!-- Input for <%= attribute.column_name %> end -->
60
67
  <% end -%>
61
68
  <% else -%>
62
69
  <% if with_sentinels? -%>
63
- <!-- Input for <%= attribute.column_name %> start -->
70
+ <!-- Input for <%= attribute.column_name %> start -->
64
71
  <% end -%>
65
- <input type="text" id="<%= attribute.column_name %>" name="<%= attribute.column_name %>" <% unless skip_validation_alerts? -%> value="<%%= @<%= singular_table_name %>.<%= attribute.column_name %> %>"<% end -%>>
72
+ <input type="text" id="<%= attribute.column_name %>_field" name="<%= attribute.column_name %>_param" <% unless skip_validation_alerts? -%> value="<%%= @<%= singular_table_name %>.<%= attribute.column_name %> %>"<% end -%>>
66
73
  <% if with_sentinels? -%>
67
- <!-- Input for <%= attribute.column_name %> end -->
74
+ <!-- Input for <%= attribute.column_name %> end -->
68
75
  <% end -%>
69
76
  <% end -%>
70
- </div>
77
+ </div>
71
78
  <% if with_sentinels? -%>
72
- <!-- Label and input for <%= attribute.column_name %> end -->
79
+ <!-- Label and input for <%= attribute.column_name %> end -->
73
80
  <% end -%>
74
81
  <% end -%>
75
82
 
76
83
  <% end -%>
77
- <button>
78
- Create <%= singular_table_name.humanize.downcase %>
79
- </button>
80
- </form>
81
-
82
- <hr>
83
-
84
- <a href="/<%= plural_table_name %>">
85
- Go back
86
- </a>
84
+ <button type="submit">
85
+ Create <%= singular_table_name.humanize.downcase %>
86
+ </button>
87
+ </form>
88
+ </div>