There are 2 models, and they are linked using a has_many :though relation.
There is the :conditions parameter, that will look for a condition in the other model table, but is there someway to create a condition in the join table?
For example, supose I have:
User
Game
GameUser
One User may have many games, as a Game may have many users. But i want to store extra information in the joint table, for example if the user likes or not that game.
And I would like to have a relation filter in my User model, something like this:
has_many :games, :through => 'game_users'
has_many :liked_games, :through => 'game_users', :conditions_join => { :like => true }
Is there a pretty way to have this functionality?