| member_model: | |
| class Member < ActiveRecord::Base | |
| has_many :teammembers | |
| has_many :teams, :through => :teammembers | |
| end | |
| ========================= | |
| team_model: | |
| class Team < ActiveRecord::Base | |
| has_many :teammembers | |
| has_many :members, :through => :teammembers | |
| end | |
| ========================= | |
| teammembers_model: | |
| class TeamMembers < ActiveRecord::Base | |
| belongs_to :member | |
| belongs_to :team | |
| end | |
| ========================= | |
| Trying to get: | |
| Member.all(:include => :team) | |
| Error: | |
| Association named 'team' was not found; perhaps you misspelled it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Favorwilliams commentedApr 15, 2014
My Pleasure to write you,
My name is Favor Williams,
My email address is
( Favor24@live.com)
Am interested to know
more about you,
Contact me for my
photo and other
important issue via,
Favor24@live.com