module Torque::PostgreSQL::Relation::Initializer

When a relation is created, force the attributes to be defined, because the type mapper may add new methods to the model. This happens for the given model Klass and its inheritances

Public Class Methods

new(klass, *) click to toggle source
Calls superclass method
# File lib/torque/postgresql/relation.rb, line 120
def initialize(klass, *)
  super

  klass.superclass.send(:relation) if klass.define_attribute_methods &&
    klass.superclass != ActiveRecord::Base && !klass.superclass.abstract_class?
end