Sha256: b0913563d64ab53adbb8f09b4201d2e26bdec5d7534c53f6f198a9a298231dfc

Contents?: true

Size: 464 Bytes

Versions: 7

Compression:

Stored size: 464 Bytes

Contents

module Tako
  module ActiveRecordExt
    module SingularAssociation
      def self.included(mod)
        mod.extend(ShardedMethods)
        mod.sharded_methods :reader,
                            :writer,
                            :create,
                            :create!,
                            :build
      end
    end
  end
end

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

Version data entries

7 entries across 7 versions & 1 rubygems

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