cookbook assignment

Would appreciate any suggestions on refactoring or ways of simplifying my code. This assignment was pretty hard for me and I think my messy code reflects that a bit. I also noticed a really weird bug yesterday that treats the recipe_id and ingredient_id as string values rather than integers. I have no idea why it is doing this!
You could use `.map` or `.collect` to refactor this code.
```ruby
@usage_ingredients_id = @usages.map { |usage| usage.ingredient_id }
```
This would accomplish the same things as lines 34-38. Even more advanced `ActiveRecord` way would be to use the `#pluck` method:

```ruby
@usage_ingredients_id = @usages.pluck(:ingredient_id)
```