Skip to content

Commit f9d4e29

Browse files
committed
allow to manually make role query strict
1 parent fbbb9f2 commit f9d4e29

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/rolify/finders.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Rolify
22
module Finders
3-
def with_role(role_name, resource = nil)
4-
strict = self.strict_rolify and resource and resource != :any
3+
def with_role(role_name, resource = nil, strict = nil)
4+
strict = self.strict_rolify and resource and resource != :any if strict.nil?
55
self.adapter.scope(
66
self,
77
{ :name => role_name, :resource => resource },
@@ -46,4 +46,4 @@ def parse_args(args, users, &block)
4646
block.call(users_to_add)
4747
end
4848
end
49-
end
49+
end

0 commit comments

Comments
 (0)