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!
This `.alphabetize` method would be a great candidate for something to test. in the `/spec/modesl/ingredient_spec.rb`, something like:

```ruby
describe ".alphabetize" do
  it "returns the first Ingredient by name" do
    ing1 = Ingredient.create(name: "z")
    ing2 = Ingredient.create(name: "a")
    expect(Ingredient.alphabetize.first).to eq ing2
  end
end
```