|
1 | | -<h1>Edit Recipe</h1> |
| 1 | +<article class='container'><h1>Edit Recipe</h1> |
2 | 2 |
|
3 | | -<strong><p class='alert'><%= flash.alert %></p></strong> |
4 | | -<% if @recipe.errors.any? %> |
5 | | - <% @recipe.errors.full_messages.each do |error| %> |
6 | | - <li class='error'><%= error %></li> |
| 3 | + <strong><p class='alert'><%= flash.alert %></p></strong> |
| 4 | + <% if @recipe.errors.any? %> |
| 5 | + <% @recipe.errors.full_messages.each do |error| %> |
| 6 | + <li class='error'><%= error %></li> |
| 7 | + <% end %> |
7 | 8 | <% end %> |
8 | | -<% end %> |
9 | 9 |
|
10 | | -<%= form_for @recipe, url: category_recipe_path do |f| %> |
| 10 | + <%= form_for @recipe, url: category_recipe_path do |f| %> |
11 | 11 |
|
12 | | -<p><%= f.label :title %></p> |
13 | | -<p><%= f.text_field :title %></p> |
| 12 | + <p><%= f.label :title %></p> |
| 13 | + <p><%= f.text_field :title %></p> |
14 | 14 |
|
15 | | -<p><%= f.label :directions %></p> |
16 | | -<p><%= f.text_area :directions %></p> |
| 15 | + <p><%= f.label :directions %></p> |
| 16 | + <p><%= f.text_area :directions %></p> |
17 | 17 |
|
18 | | -<p><%= f.label :time %></p> |
19 | | -<span><%= f.text_field :time %></span> |
20 | | -<span><%= f.label "in minutes" %></span> |
| 18 | + <p><%= f.label :time %></p> |
| 19 | + <span><%= f.text_field :time %></span> |
| 20 | + <span><%= f.label "in minutes" %></span> |
21 | 21 |
|
22 | | -<p><%= f.label :difficulty %></p> |
23 | | -<p><%= f.select :difficulty, options_for_select([['easy', 'easy'], ['medium', 'medium'], ['hard', 'hard']], selected: params[:difficulty]) %></p><br> |
| 22 | + <p><%= f.label :difficulty %></p> |
| 23 | + <p><%= f.select :difficulty, options_for_select([['easy', 'easy'], ['medium', 'medium'], ['hard', 'hard']], selected: params[:difficulty]) %></p><br> |
24 | 24 |
|
25 | | -<%= f.submit %> |
26 | | -<% end %> |
| 25 | + <%= f.submit %> |
| 26 | + <% end %> |
27 | 27 |
|
| 28 | +</article> |
0 commit comments