# Polymorphic has\_many through source problem

**URL:** <https://discuss.rubyonrails.org/t/polymorphic-has-many-through-source-problem/44514>\
**Category:** rubyonrails-talk\
**Created:** [July 24, 2009, 12:29am UTC](https://discuss.rubyonrails.org/t/polymorphic-has-many-through-source-problem/44514 "2009-07-24T00:29:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenP](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@BenP](https://discuss.rubyonrails.org/u/BenP)\
**Post date:** [July 24, 2009, 12:29am UTC](https://discuss.rubyonrails.org/t/polymorphic-has-many-through-source-problem/44514/1 "2009-07-24T00:29:24Z")

</div>

My issue is as follows:

I have a model with 2 polymorphic associations - authorisable and permissible.

In my current example, permissible represents an Account model and authorisable is a User model

I need to be able to do find the users in an account by @account.users

Account.rb

has\_many :permissions, :as =\> :permissible has\_many :users, :through =\> :permissions, :source =\> :authorisable

Permission.rb belongs\_to :permissible, :polymorphic =\> true belongs\_to :authorisable, :polymorphic =\> true

The error I'm receiving is: Cannot have a has\_many :through association 'Account#users' on the polymorphic object 'Authorisable#authorisable'

I'm confused, can anybody help?

---

<div class="post-metadata">

**Author:** ![Matt\_Jones](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Matt\_Jones](https://discuss.rubyonrails.org/u/Matt_Jones)\
**Post date:** [July 24, 2009, 5:13pm UTC](https://discuss.rubyonrails.org/t/polymorphic-has-many-through-source-problem/44514/2 "2009-07-24T17:13:46Z")

</div>

The error message says it all - it's not currently possible to do a has\_many :through on a polymorphic association...

--Matt Jones
