Class: Rails::Auth::InstalledConstraint
- Inherits:
-
Object
- Object
- Rails::Auth::InstalledConstraint
- Defined in:
- lib/rails/auth/installed_constraint.rb
Overview
Rails constraint to make sure the ACLs have been installed
Instance Method Summary collapse
-
#initialize(config = Rails.application) ⇒ InstalledConstraint
constructor
A new instance of InstalledConstraint.
- #matches?(_request) ⇒ Boolean
Constructor Details
#initialize(config = Rails.application) ⇒ InstalledConstraint
Returns a new instance of InstalledConstraint.
7 8 9 |
# File 'lib/rails/auth/installed_constraint.rb', line 7 def initialize(config = Rails.application) @config = config end |
Instance Method Details
#matches?(_request) ⇒ Boolean
11 12 13 |
# File 'lib/rails/auth/installed_constraint.rb', line 11 def matches?(_request) @config.middleware.include?(Rails::Auth::ACL::Middleware) end |