Sha256: 4f3f6ec9953c4fd5174573acb48839fa56c707b969418208ff928b6b0cf35ec1

Contents?: true

Size: 361 Bytes

Versions: 7

Compression:

Stored size: 361 Bytes

Contents

module Tako
  module ActiveRecordExt
    module Association
      def current_shard
        owner.current_shard
      end

      def self.included(mod)
        mod.extend(ShardedMethods)
        mod.sharded_methods :target_scope
      end
    end
  end
end

ActiveRecord::Associations::Association.class_eval do
  include Tako::ActiveRecordExt::Association
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tako-0.6.0 lib/tako/active_record_ext/association.rb
tako-0.5.0 lib/tako/active_record_ext/association.rb
tako-0.4.1 lib/tako/active_record_ext/association.rb
tako-0.4.0 lib/tako/active_record_ext/association.rb
tako-0.3.2 lib/tako/active_record_ext/association.rb
tako-0.3.1 lib/tako/active_record_ext/association.rb
tako-0.3.0 lib/tako/active_record_ext/association.rb