lib/rails/auth/acl/middleware.rb in rails-auth-0.2.0 vs lib/rails/auth/acl/middleware.rb in rails-auth-0.3.0
- old
+ new
@@ -13,17 +13,17 @@
# @param [Object] app next app in the Rack middleware chain
# @param [Hash] acl Rails::Auth::ACL object to authorize the request with
#
# @return [Rails::Auth::ACL::Middleware] new ACL middleware instance
def initialize(app, acl: nil)
- fail ArgumentError, "no acl given" unless acl
+ raise ArgumentError, "no acl given" unless acl
@app = app
@acl = acl
end
def call(env)
- fail NotAuthorizedError, "unauthorized request" unless @acl.match(env)
+ raise NotAuthorizedError, "unauthorized request" unless @acl.match(env)
@app.call(env)
end
end
end
end