My issue is as follows:
I have a model with 2 polymorphic associations - authorisable and
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
has_many :permissions, :as => :permissible
has_many :users, :through => :permissions, :source => :authorisable
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?