Class: ActiveAccess::Railtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- ActiveAccess::Railtie
- Defined in:
- lib/active-access/rails.rb
Instance Method Summary collapse
Instance Method Details
#app ⇒ Object
25 26 27 |
# File 'lib/active-access/rails.rb', line 25 def app Rails.application end |
#insert_middleware ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/active-access/rails.rb', line 13 def insert_middleware if defined? ActionDispatch::DebugExceptions app.middleware.insert_after ActionDispatch::DebugExceptions, ActiveAccess::Middleware else app.middleware.use ActiveAccess::Middleware end end |
#use_active_access? ⇒ Boolean
21 22 23 |
# File 'lib/active-access/rails.rb', line 21 def use_active_access? ActiveAccess.config.enabled? end |