lib/sidekiq_unique_jobs/web/helpers.rb in sidekiq-unique-jobs-7.0.6 vs lib/sidekiq_unique_jobs/web/helpers.rb in sidekiq-unique-jobs-7.0.7

- old
+ new

@@ -11,11 +11,13 @@ # # @return [String] the path to gem specific views VIEW_PATH = File.expand_path("../web/views", __dir__).freeze # # @return [Array<String>] safe params - SAFE_CPARAMS = %w[cursor prev_cursor].freeze + SAFE_CPARAMS = %w[ + filter count cursor prev_cursor poll direction + ].freeze extend self # # Opens a template file contained within this gem @@ -65,13 +67,11 @@ # @param [Hash] options the key/value to parameterize # # @return [String] a url safe parameter string # def cparams(options) - # stringify - options.transform_keys(&:to_s) - - params.merge(options).map do |key, value| + stringified_options = options.transform_keys(&:to_s) + params.merge(stringified_options).map do |key, value| next unless SAFE_CPARAMS.include?(key) "#{key}=#{CGI.escape(value.to_s)}" end.compact.join("&") end