I have tried to use the rails console to run the following:
Teamplayer.includes(:live_player)


It tells me:
Association named 'live_player' was not found on Teamplayer; perhaps you
misspelled it?

so the tables are named live_players and teamplayers respectively. There
is also another table called teams but that will only make sense in the
models below:

Liveplayer:

class LivePlayer < ActiveRecord::Base
has_many :teamplayers
has_many :fteams, :through => :teamplayers
end

Fteam:

class Fteam < ActiveRecord::Base
belongs_to :liveplayer
end
Teamplayer:

class Teamplayer < ActiveRecord::Base
belongs_to :live_player
belongs_to :fteam
end

so what is problem with this. I have been at this for days

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/3fb524d40ef9244424d8dbd6b3e3af0c%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to