module Sidekiq::WebHelpers
Direct including types
Defined in:
sidekiq/web_helpers.crConstant Summary
-
LANGS =
["cs", "da", "de", "el", "en", "es", "fr", "hi", "it", "ja", "ko", "nb", "nl", "pl", "pt-br", "pt", "ru", "sv", "ta", "uk", "zh-cn", "zh-tw"] of ::String
-
LOCALE_PATHS =
["../web/locales"]
-
SAFE_QPARAMS =
["page", "poll"] of ::String
Instance Method Summary
- #csrf_tag
- #current_path
- #current_status
- #display_args(args, truncate_after_chars = 2000)
- #environment_title_prefix
-
#filtering(*args)
This is a hook for a Sidekiq Pro feature.
- #get_locale
- #h(text)
- #job_params(job, score)
- #list_page(key, pageidx = 1, page_size = 25)
-
#locale
Given a browser request Accept-Language header like "fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4,ru;q=0.2", this function will return "fr" since that"s the first code with a matching locale in web/locales
- #number_with_delimiter(number)
- #page(key, pageidx = 1, page_size = 25, opts = nil)
- #parse_params(params)
- #processes
- #product_version
-
#qparams(newparams)
Merge options with current params, filter safe params, and stringify to query string
- #redis_info
- #redis_location
- #relative_time(time)
- #retries_with_score(score)
- #root_path
- #stats
- #t(msg, options = {} of String => String)
- #truncate(text, truncate_after_chars = 2000)
-
#url_with_query(ctx, url)
Any paginated list that performs an action needs to redirect back to the proper page after performing that action.
- #workers
- #zpage(key, pageidx = 1, page_size = 25, opts = nil)
Instance Method Detail
Given a browser request Accept-Language header like "fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4,ru;q=0.2", this function will return "fr" since that"s the first code with a matching locale in web/locales
Merge options with current params, filter safe params, and stringify to query string
Any paginated list that performs an action needs to redirect back to the proper page after performing that action.