Module: RestfulAcl::Helper

Defined in:
lib/restful_acl/helper.rb

Instance Method Summary collapse

Instance Method Details

#allowed?(&block) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
# File 'lib/restful_acl/helper.rb', line 4

def allowed?(&block)
  options = UrlParser.new(current_user, &block).options_hash
  access = RestfulAcl::Base.new(options)

  yield if access.allowed?
end