Re: [Rails] Calling destroy on a model that has no id column

2010-04-21 Thread soldier
what's content of params[:id], why not use favorite_id; 2010/4/22 Lee Smith : > I've got a model, Favorite, that I'm trying to remove from the > database by calling the destroy method on it.  What's noteworthy about > this model is that it doesn't have an id column.  The unique index on > the Favo

[Rails] Calling destroy on a model that has no id column

2010-04-21 Thread Lee Smith
I've got a model, Favorite, that I'm trying to remove from the database by calling the destroy method on it. What's noteworthy about this model is that it doesn't have an id column. The unique index on the Favorites table is a both the user_id and the article_id. A favorite belongs to a user and