Method: ApplicationHelper#direct_request?
- Defined in:
- app/helpers/application_helper.rb
#direct_request? ⇒ Boolean?
Check if the current request is a direct user request, or a resource load.
308 309 310 311 312 313 314 |
# File 'app/helpers/application_helper.rb', line 308 def direct_request? if request.headers['Sec-Fetch-Mode'].present? && request.headers['Sec-Fetch-Mode'] == 'navigate' true elsif request.headers['Sec-Fetch-Mode'].present? false end end |