Sha256: 382a83960b3ce86218cdd7079e1af8b4144b3c45851ecfa8d4ecac382da358e6

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 Bytes

Contents

module Octopus
  module Persistence
    def update_attribute(*args)
      run_on_shard { super }
    end

    def update_attributes(*args)
      run_on_shard { super }
    end

    def update_attributes!(*args)
      run_on_shard { super }
    end

    def reload(*args)
      run_on_shard { super }
    end

    def delete
      run_on_shard { super }
    end

    def destroy
      run_on_shard { super }
    end

    def touch(*args)
      run_on_shard { super }
    end

    def update_column(*args)
      run_on_shard { super }
    end

    def increment!(...)
      run_on_shard { super(...) }
    end

    def decrement!(*args)
      run_on_shard { super }
    end
  end
end

ActiveRecord::Base.send(:include, Octopus::Persistence)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ar-octopus-ruby-3-0.11.3 lib/octopus/persistence.rb
ar-octopus-ruby-3-0.11.2 lib/octopus/persistence.rb