Displaying 1 result from an estimated 1 matches for "gm_list".
Did you mean:
g_list
2007 Jul 29
1
Curious why this doesn't work. (has_many, belongs_to)
Two Models.
class Gm < ActiveRecord::Base
belongs_to :pool
# mode code here.
end
class Pool < ActiveRecord::Base
has_many :gms
# mode code here.
end
Testing code through the console.
>> gm_list.each{ | gm | puts " GM name: #{ gm.user_name } belongs to Pool: #{ gm.pool.pool_name } " }; nil
GM name: John belongs to Pool: RHP 07-08 Season - Career League
GM name: Stef belongs to Pool: RHP 07-08 Season - Career League
GM name: Chris belongs to Pool: RHP 07-08 Season - Career Leag...