markbates/mongoid-tags-arent-hard — pull request #11 by davesouth (2013-07-23 19:18:43+00:00)
Title: Fixed class method all_#{name} to honor default scope

Class method all_#{name} failed to apply default_scope. The fix is simple. Instead of calling "queryable", we use "all" which creates the valid Mongoid query object that includes the default scope. If we want to skip the default scope we add "unscoped" like this: `Class.unscoped.all_tags`

Default scope is often used to enforce account scope on multi-tenant projects. Without default scope being honored, the all_#{name} method returns all items found across tenants.