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?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to