Module: ApplicationHelper
- Defined in:
- app/helpers/application_helper.rb
Instance Method Summary collapse
- #dispatcher_route ⇒ Object
- #requests_recorded ⇒ Object
- #show_no_requests_found(_bucket) ⇒ Object
- #token_url(token) ⇒ Object
Instance Method Details
#dispatcher_route ⇒ Object
2 3 4 5 |
# File 'app/helpers/application_helper.rb', line 2 def dispatcher_route controller_name = controller_path.gsub(/\//, '_') "#{controller_name}##{action_name}" end |
#requests_recorded ⇒ Object
15 16 17 |
# File 'app/helpers/application_helper.rb', line 15 def requests_recorded number_with_delimiter(Rails.cache.fetch('requests_recorded', raw: true) { 0 }) end |
#show_no_requests_found(_bucket) ⇒ Object
11 12 13 |
# File 'app/helpers/application_helper.rb', line 11 def show_no_requests_found(_bucket) content_tag(:p, 'No requests found.') end |
#token_url(token) ⇒ Object
7 8 9 |
# File 'app/helpers/application_helper.rb', line 7 def token_url(token) "#{request.protocol}#{request.host_with_port}/#{token}" end |