Sha256: 62812eecbefa4b8feb160d2d9ca0dbf0cf23f8f5a3a07be8d359870dc072aa09
Contents?: true
Size: 525 Bytes
Versions: 9
Compression:
Stored size: 525 Bytes
Contents
class ACLBooleanMethod < EmptyController access_control :acl, :filter => false do allow all, :to => [:index, :show], :if => :true_meth allow :admin, :unless => :false_meth allow all, :if => :false_meth allow all, :unless => :true_meth end before_filter :check_acl def check_acl if self.acl true else raise Acl9::AccessDenied end end private def true_meth; true end def false_meth; false end end
Version data entries
9 entries across 9 versions & 1 rubygems