module ActionController::AllowBrowser
def allow_browser(versions:, block:)
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