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-2.0.0 lib/switchman/active_record/persistence.rb
switchman-1.16.0 lib/switchman/active_record/persistence.rb
switchman-1.15.2 lib/switchman/active_record/persistence.rb
switchman-1.15.1 lib/switchman/active_record/persistence.rb
switchman-1.15.0 lib/switchman/active_record/persistence.rb
switchman-1.14.10 lib/switchman/active_record/persistence.rb
switchman-1.14.9 lib/switchman/active_record/persistence.rb
switchman-1.14.8 lib/switchman/active_record/persistence.rb
switchman-1.14.7 lib/switchman/active_record/persistence.rb
switchman-1.14.6 lib/switchman/active_record/persistence.rb
switchman-1.14.5 lib/switchman/active_record/persistence.rb
switchman-1.14.4 lib/switchman/active_record/persistence.rb
switchman-1.14.3 lib/switchman/active_record/persistence.rb
switchman-1.14.2 lib/switchman/active_record/persistence.rb
switchman-1.14.1 lib/switchman/active_record/persistence.rb
switchman-1.14.0 lib/switchman/active_record/persistence.rb
switchman-1.13.3 lib/switchman/active_record/persistence.rb
switchman-1.13.2 lib/switchman/active_record/persistence.rb
switchman-1.13.1 lib/switchman/active_record/persistence.rb
switchman-1.13.0 lib/switchman/active_record/persistence.rb