Closed isc closed 13 years ago
Sorry for the delay. I'm pretty sure I know the cause. The internal named scope implementation in ActiveRecord uses sort of a proxy class to keep track of the options being accumulated. If the scope doesn't exist at the time it delegates the call off to the original class, thus losing the options. If it does exist, it keeps accumulating. Notice when you try the assertion a second time, it works.
I'll come up with a proper fix.
This has been fixed and is available in the latest version.
Thanks a lot for the fix.
Hi,
First of all, thanks a lot for this great gem. I've encountered a bug seemingly related to scope caching ; the association conditions are dropped on certain occasions. I've written a failing test case that is exhibiting the bug. I've also taken the liberty to write a Gemfile specifying the dependencies needed to work on the gem, as I've had quite a hard time figuring out the correct values (especially the version needed for spec). Can you please let me know if there's a chance that this bug can be easily and promptly fixed by you ? Thanks in advance