I recently encountered a problem in my FriendlyId plugin where a
belongs_to association unexpectedly failed to load because a user was
using state_machine and a default scope to make only "active" records
return by default.
It seems logical to allow associations to be specifed as "unscoped" in
order to bypass any default scopes. Conceptually I see this as similar
to the difference between initialize and allocate. For user
application code the solution can be "use a scope, not a default
scope" but in the context of a plugin I think there are times where
this functionality is needed.
Perhaps I am missing something that is already in Rails, if so, can
somebody point me in the right direction? Otherwise if this sounds
like something reasonably desirable I'm happy to work on it.