Sha256: 8bd95957f3e6edd6e078d43226d74a797d6ccddbcc34c866e871f7b90f363c9a

Contents?: true

Size: 469 Bytes

Versions: 8

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

require "sidekiq/web/helpers"
require "sidekiq/web/router"
require_relative "web_action_helper"

module Sidekiq
  module WebRouterHelper
    def replace_content(path, &block)
      Sidekiq::Config::DEFAULTS[:replace_views] ||= {}
      Sidekiq::Config::DEFAULTS[:replace_views][path.to_s] ||= []
      Sidekiq::Config::DEFAULTS[:replace_views][path.to_s] << block
    end
  end

  Sidekiq::WebRouter.prepend(Sidekiq::WebRouterHelper)
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sidekiq-belt-1.0.0 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.7 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.6 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.5 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.4 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.2 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.1 lib/sidekiq/web_router_helper.rb
sidekiq-belt-0.3.0 lib/sidekiq/web_router_helper.rb