Sha256: 82ef95287be7dee0c9ec2886afa703783d5bf8653ac837e7efa3c5a80bf621ee

Contents?: true

Size: 406 Bytes

Versions: 36

Compression:

Stored size: 406 Bytes

Contents

module Switchman
  module ActiveRecord
    module Persistence
      # touch reads the id attribute directly, so it's not relative to the current shard
      def touch(*)
        shard.activate(self.class.shard_category) { super }
      end

      if ::Rails.version >= '5.2'
        def update_columns(*)
          shard.activate(self.class.shard_category) { super }
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
switchman-1.12.16 lib/switchman/active_record/persistence.rb
switchman-1.12.15 lib/switchman/active_record/persistence.rb
switchman-1.12.14 lib/switchman/active_record/persistence.rb
switchman-1.12.13 lib/switchman/active_record/persistence.rb
switchman-1.12.12 lib/switchman/active_record/persistence.rb
switchman-1.12.11 lib/switchman/active_record/persistence.rb
switchman-1.12.10 lib/switchman/active_record/persistence.rb
switchman-1.12.9 lib/switchman/active_record/persistence.rb
switchman-1.12.8 lib/switchman/active_record/persistence.rb
switchman-1.12.7 lib/switchman/active_record/persistence.rb
switchman-1.12.6 lib/switchman/active_record/persistence.rb
switchman-1.12.5 lib/switchman/active_record/persistence.rb
switchman-1.12.4 lib/switchman/active_record/persistence.rb
switchman-1.12.3 lib/switchman/active_record/persistence.rb
switchman-1.12.2 lib/switchman/active_record/persistence.rb
switchman-1.12.1 lib/switchman/active_record/persistence.rb