parsley/app/views/recipes/_form.html.erb

25 lines
617 B
Plaintext
Raw Normal View History

2016-01-12 18:43:00 -06:00
<%= form_for(@recipe) do |f| %>
<%= render partial: 'shared/error_list', locals: {model: @recipe} %>
<h3>Ingredients</h3>
<% @recipe.recipe_ingredients.each do |ri| %>
<%= render partial: 'recipes/editor/ingredient', locals: { recipe_ingredient: ri } %>
<% end %>
<button id="add_recipe_button" type="button" class="btn btn-primary">Add Ingredient</button>
<h3>Steps</h3>
<% @recipe.recipe_steps.each do |rs| %>
<%= render partial: 'recipes/editor/step', locals: { recipe_step: rs } %>
<% end %>
<div class="actions">
<%= f.submit class: 'btn btn-primary' %>
</div>
<% end %>