GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
When trying to access an ActiveResource model through the polymorphic association (belongs_to), the following exception is thrown:
undefined method `scoped' for Employee:Class
where Employee < ActiveResource::Base
This is a regression from Rails 3.0. More details in the example repo.
There is a repo with an isolated example of the problem. The example schema is based on the guide to Active Record Associations.
Access the active resource directly (eg. Employee.find(picture.imageable_id)).
Interesting! Didn't know that ever worked. It's definitely unintentional; polymorphic associations are only meant to work with Active Record models.
Would be pretty cool to make this work again, though!