Ruby on Rails: How to model a “user favorite model”?

I'd say this is typical crud if you stick with convention. Add is create, remove is destroy class FavouritesController :index, :create, :destroy end #user. Rb has_many :user_favourites, :dependent => :destroy has_many :favourites, :through => :user_favourites, :source => :question.

I'd say this is typical crud if you stick with convention. Add is create, remove is destroy. Class FavouritesController :index, :create, :destroy end #user.

Rb has_many :user_favourites, :dependent => :destroy has_many :favourites, :through => :user_favourites, :source => :question.

I haven't seen this syntax before in any tutorials that I've read: @user. Favourites true and using rails 3 javscript helpers. See asciicasts.Com/episodes/205-unobtrusive-javascript – mark Aug 19 at 10:17 I keep getting a "stack level too deep" error and can't figure out why that is.

I think it has something to do with the model associations. – Andrew Aug 23 at 4:50 Ah nevermind, figured it out. I had duplicate :has_many :user_favorites – Andrew Aug 23 at 5:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions