Is it simply a limitation that multi-level polymorphic associations cannot be traversed? Please find below my use case.
Given:
class Document < ActiveRecord::Base
belongs_to :documentable, :polymorphic => true
end
class Subject < ActiveRecord::Base
has_many :documents, :as => :documentable
belongs_to :program
end
class Program < ActiveRecord::Base
has_many :subjects
end
Is it simply a limitation that multi-level polymorphic associations cannot be traversed? Please find below my use case.
Given:
When:
Then:
Full error: https://gist.github.com/900229
The following works:
Thanks for the great gem!