Created
June 12, 2009 13:45
-
-
Save be9/128641 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Acl9 | |
module ControllerExtensions | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
# Create an access control block in the controller. | |
# | |
# @overload access_control(options, &block) | |
# Translates given ACL +block+ to a lambda, raising | |
# {Acl9::AccessDenied} exception on occasion, and installs it with | |
# +before_filter+. | |
# | |
# @param [Hash] options the options | |
# | |
# @overload access_control(method_name, options, &block) | |
# Adds given ACL +block+ to the controller as a method.⋅ | |
# | |
# @param [Symbol] method_name method name to add. | |
# @param [Hash] options the options | |
def access_control(*args, &block) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment