Module: CanTango::Permit::Helper::RoleMatcher
Instance Method Summary collapse
Instance Method Details
#role_group_match?(candidate, group_name = nil) ⇒ Boolean
8 9 10 |
# File 'lib/cantango/roles_ext/permit/helper/role_matcher.rb', line 8 def role_group_match? candidate, group_name = nil candidate.is_in_group? permit_name(self.class) end |
#role_match?(candidate) ⇒ Boolean
4 5 6 |
# File 'lib/cantango/roles_ext/permit/helper/role_matcher.rb', line 4 def role_match? candidate candidate.has_role? permit_name(self.class) end |