diff --git a/app/controllers/ingredients_controller.rb b/app/controllers/ingredients_controller.rb
index 4f02103..91a5f30 100644
--- a/app/controllers/ingredients_controller.rb
+++ b/app/controllers/ingredients_controller.rb
@@ -2,7 +2,7 @@ class IngredientsController < ApplicationController
def search
@ingredients = Food.search(params[:query]).order(:name).to_a
- @ingredients.concat(Recipe.search_by_name(params[:query]).order(:name).to_a)
+ @ingredients.concat(Recipe.is_ingredient.search_by_name(params[:query]).order(:name).to_a)
@ingredients.sort { |a, b| a.name <=> b.name }
end
diff --git a/app/controllers/recipes_controller.rb b/app/controllers/recipes_controller.rb
index 2be59a0..71526d3 100644
--- a/app/controllers/recipes_controller.rb
+++ b/app/controllers/recipes_controller.rb
@@ -86,7 +86,7 @@ class RecipesController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through.
def recipe_params
- params.require(:recipe).permit(:name, :description, :source, :yields, :total_time, :active_time, :step_text, tag_names: [], recipe_ingredients_attributes: [:name, :ingredient_id, :quantity, :units, :preparation, :sort_order, :id, :_destroy])
+ params.require(:recipe).permit(:name, :description, :source, :yields, :total_time, :active_time, :step_text, :is_ingredient, tag_names: [], recipe_ingredients_attributes: [:name, :ingredient_id, :quantity, :units, :preparation, :sort_order, :id, :_destroy])
end
def criteria_params
diff --git a/app/javascript/components/RecipeEdit.vue b/app/javascript/components/RecipeEdit.vue
index 1ada677..64b8601 100644
--- a/app/javascript/components/RecipeEdit.vue
+++ b/app/javascript/components/RecipeEdit.vue
@@ -1,5 +1,5 @@
-
+
@@ -10,6 +10,10 @@
+
+
+
+
@@ -35,8 +39,6 @@
- Ingredients
-
@@ -53,6 +55,12 @@
+
+
+
@@ -121,6 +129,10 @@