search for: find_by_owners

Displaying 2 results from an estimated 2 matches for "find_by_owners".

Did you mean: find_by_owner
2006 Aug 15
5
Hard time understanding the differences between "def self.foo" and "def foo"
Hi guys, I''m having a little trouble understanding the differences and knowing when to use "def foo" and "def self.foo" in my models. I don''t quite understand them and was hoping someone could explain or give me examples on how to use the "self." properly. For example, I had "def foo" in my model "Account" and in one of
2006 Apr 05
0
Is there AR magic for this?
...y to use the players list later anyway, but I feel like there should be a simple way to get the Player without loading all the players. I suppose Player.find_by_game_id_and_user_id(@game.id, @user.id) would work, but it isn''t a whole lot nicer. I''m hoping for something like Player.find_by_owners(:user => @user, :game => @game). --Greg