Module: ActionController::AllowBrowser
Do not use. This module is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Classes:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveSupport::Concern
|
|
Defined in: | actionpack/lib/action_controller/metal/allow_browser.rb |
Class Method Summary
::ActiveSupport::Concern
- Extended
class_methods | Define class methods from given block. |
included | Evaluate given block in context of base class, so that you can write class macros here. |
prepended | Evaluate given block in context of base class, so that you can write class macros here. |
append_features, prepend_features |
Instance Method Summary
Instance Method Details
#allow_browser(versions:, block:) (private)
[ GitHub ]# File 'actionpack/lib/action_controller/metal/allow_browser.rb', line 63
def allow_browser(versions:, block:) require "useragent" if BrowserBlocker.new(request, versions: versions).blocked? ActiveSupport::Notifications.instrument("browser_block.action_controller", request: request, versions: versions) do block.is_a?(Symbol) ? send(block) : instance_exec(&block) end end end