Sha256: f256e109feee45cab31315647dfa7474606e71e040aff1c8f628fad2c9c4772b

Contents?: true

Size: 632 Bytes

Versions: 15

Compression:

Stored size: 632 Bytes

Contents

require_relative 'reflection/abstract_reflection'
require_relative 'reflection/association_reflection'
require_relative 'reflection/belongs_to_many_reflection'
require_relative 'reflection/has_many_reflection'
require_relative 'reflection/runtime_reflection'
require_relative 'reflection/through_reflection'

module Torque
  module PostgreSQL
    module Reflection

      def create(macro, name, scope, options, ar)
        return super unless macro.eql?(:belongs_to_many)
        BelongsToManyReflection.new(name, scope, options, ar)
      end

    end

    ::ActiveRecord::Reflection.singleton_class.prepend(Reflection)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
torque-postgresql-1.1.8 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.7 lib/torque/postgresql/reflection.rb
torque-postgresql-2.0.3 lib/torque/postgresql/reflection.rb
torque-postgresql-2.0.2 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.6 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.5 lib/torque/postgresql/reflection.rb
torque-postgresql-2.0.1 lib/torque/postgresql/reflection.rb
torque-postgresql-2.0.0 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.4 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.3 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.2 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.1 lib/torque/postgresql/reflection.rb
torque-postgresql-1.1.0 lib/torque/postgresql/reflection.rb
torque-postgresql-1.0.1 lib/torque/postgresql/reflection.rb
torque-postgresql-1.0.0 lib/torque/postgresql/reflection.rb