Module: Switchman::Rails::ClassMethods
- Defined in:
- lib/switchman/rails.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(klass) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/switchman/rails.rb', line 5 def self.prepended(klass) # in Rails 4+, the Rails.cache= method was used during bootstrap to set # Rails.cache(_without_sharding) to the value from the config file. but now # that that's done (the bootstrap happened before this module is included # into Rails), we want to make sure no one tries to assign to Rails.cache, # because it would be wrong w.r.t. sharding. klass.send(:remove_method, :cache=) end |