Skip to content

Commit

Permalink
Eager load MemoryCacheDebounceAdapter (#274)
Browse files Browse the repository at this point in the history
# Bugfix

## Description

autoloading MemoryCacheDebounceAdapter intermittently caused
`uninitialized constant
CableReady::Updatable::MemoryCacheDebounceAdapter` as reported by @obie
and others. back to eager loading it.

## Checklist

- [x] My code follows the style guidelines of this project
- [x] Checks (StandardRB & Prettier-Standard) are passing
  • Loading branch information
julianrubisch authored Apr 4, 2023
1 parent 5f76b72 commit aa31451
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/concerns/cable_ready/updatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module CableReady
module Updatable
extend ::ActiveSupport::Concern

mattr_accessor :debounce_adapter, default: MemoryCacheDebounceAdapter.instance
mattr_accessor :debounce_adapter, default: ::CableReady::Updatable::MemoryCacheDebounceAdapter.instance

included do |base|
if defined?(ActiveRecord) && base < ActiveRecord::Base
Expand Down
2 changes: 0 additions & 2 deletions lib/cable_ready.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
require "cable_ready_helper"

module CableReady
autoload :MemoryCacheDebounceAdapter, "cable_ready/updatable/memory_cache_debounce_adapter"

class << self
def config
CableReady::Config.instance
Expand Down

0 comments on commit aa31451

Please sign in to comment.