# File lib/rolify/adapters/mongoid/role_adapter.rb, line 11 def where_strict(relation, args) return relation.where(:name => args[:name]) if args[:resource].blank? resource = if args[:resource].is_a?(Class) {class: args[:resource].to_s, id: nil} else {class: args[:resource].class.name, id: args[:resource].id} end relation.where(:name => args[:name], :resource_type => resource[:class], :resource_id => resource[:id]) end