Richa

Yes thats how I wrote it, you can not create ingredient independently.
There are lot other methods that I am not using in this app but I created
initially!! I think I have to get rid of it.

On Fri, Nov 14, 2014 at 4:21 PM, Andrew Gorcester <notifications@github.com>
wrote:

> In richa/cooks/app/controllers/ingredients_controller.rb:
>
> > @@ -0,0 +1,39 @@
> > +class IngredientsController < ApplicationController
> > +  def index
> > +    @ingredients = Ingredient.all
> > +  end
> > +
> > +  def new
> > +    @ingredient = Ingredient.new
> > +  end
> > +
> > +  def create
>
> It looks like ingredients are created implicitly when they're used in
> recipes (which makes sense) -- and that there's no mechanism for adding an
> ingredient without adding a recipe. Is that correct? If so, new and create
> here might be "cruft" from an earlier version of your project -- best to
> get rid of it.
>
> If you decide to use it later, you can always re-add it with git magic. I
> wouldn't recommend using it exactly as-is, though, since it doesn't check
> if a name is already used and it looks like it might allow a no-name
> ingredient.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Ada-Projects/Ada-Cooks/pull/12/files#r20396285>.
>