Sha256: f30229f08d9162cdd3223af3b247fef744fff53d3cf18550e0e0428409871100

Contents?: true

Size: 311 Bytes

Versions: 7

Compression:

Stored size: 311 Bytes

Contents

module Octopus::ResultPatch
  attr_accessor :current_shard

  private

  def hash_rows
    if current_shard.blank?
      super
    else
      foo = super
      foo.each { |f| f.merge!('current_shard' => current_shard) }
      foo
    end
  end
end

class ActiveRecord::Result
  prepend Octopus::ResultPatch
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
ar-octopus-ruby-3-0.11.3 lib/octopus/result_patch.rb
ar-octopus-ruby-3-0.11.2 lib/octopus/result_patch.rb
ar-octopus-0.10.2 lib/octopus/result_patch.rb
ar-octopus-0.10.1 lib/octopus/result_patch.rb
ar-octopus-0.10.0 lib/octopus/result_patch.rb
ar-octopus-master-0.9.2.1 lib/octopus/result_patch.rb
ar-octopus-0.9.2 lib/octopus/result_patch.rb