I'm sorry, but the "Showing recipes in a category" code here is not ideal, and certainly not the best/proper way to do what you're trying to do. Consider if you have 2000 recipes in your database, and the category you are trying to view only has one recipe. You've just loaded 2000 recipes into memory to only show 1! What's more, that sort of logic should not be in the view.
Something along the lines of:
@recipes = Category.find(@params['category']?).recipes
will get all the recipes for a specific category, and you won't need any logic in the view to deal with it.