Sha256: eb5a60b5c367657c82f412cb90fe16703418e8dc462604855dd7dc6b988380c2
Contents?: true
Size: 545 Bytes
Versions: 7
Compression:
Stored size: 545 Bytes
Contents
module Acl9 module Helpers def self.included(base) base.extend ClassMethods end module ClassMethods def access_control(method, opts = {}, &block) subject_method = opts.delete(:subject_method) || Acl9::config[:default_subject_method] raise ArgumentError, "Block must be supplied to access_control" unless block generator = Acl9::Dsl::Generators::HelperMethod.new(subject_method, method) generator.acl_block!(&block) generator.install_on(self, opts) end end end end
Version data entries
7 entries across 7 versions & 6 rubygems