# Simple relations are failing

**URL:** <https://www.ruby-forum.com/t/simple-relations-are-failing/156799>\
**Category:** Rails\
**Created:** [January 3, 2009, 1:03am UTC](https://www.ruby-forum.com/t/simple-relations-are-failing/156799 "2009-01-03T01:03:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisolsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c6cbf5/32.png) [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Post date:** [January 3, 2009, 1:03am UTC](https://www.ruby-forum.com/t/simple-relations-are-failing/156799/1 "2009-01-03T01:03:19Z")

</div>

Can anyone see why the league\_organizers relation is failing.

class League \< ActiveRecord::Base  
has\_many :league\_admins  
has\_many :league\_organizers, :through =\> :league\_admins, :class\_name  
=\> “User”

class LeagueAdmin \< ActiveRecord::Base  
belongs\_to :league  
belongs\_to :user

I am getting the following error message:

ActiveRecord::HasManyThroughSourceAssociationNotFoundError: Could not  
find the source association(s) :league\_admins in model LeagueAdmin. Try  
‘has\_many :league\_organizers, :through =\> :league\_admins, :source =\>  
‘. Is it one of :league or :user?  
from  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active\_record/reflection.rb:199:in  
`check_validity!' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/has_many_through_association.rb:5:in`initialize’  
from  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active\_record/associations.rb:1128:in  
`new' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1128:in`league\_organizers’  
from (irb):2

I tried adding the source option with and without the class\_name but it  
still fails. As I mentioned it is a simple relation. Has something  
changed in the last while to cause this?

I am currently using Rails 2.2.2

Thanks for the help.
