Sha256: 78572eb2950718814bf8f3dd6a93d9422ef33e7a821bcd2c7ca53f8f7ef43b2d

Contents?: true

Size: 711 Bytes

Versions: 8

Compression:

Stored size: 711 Bytes

Contents

require_relative 'attributes/type_map'
require_relative 'attributes/lazy'

require_relative 'attributes/builder'

require_relative 'attributes/enum'

module Torque
  module PostgreSQL
    module Attributes
      extend ActiveSupport::Concern

      included do
        class_attribute :enum_save_on_bang, instance_accessor: true
        self.enum_save_on_bang = Torque::PostgreSQL.config.enum.save_on_bang
      end

      module ClassMethods
        private

          def define_attribute_method(attribute)
            type = attribute_types[attribute]
            super unless TypeMap.lookup(type, self, attribute, true)
          end

      end
    end

    ActiveRecord::Base.include Attributes
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
torque-postgresql-0.1.7 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.6 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.5 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.4 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.3 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.2 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.1 lib/torque/postgresql/attributes.rb
torque-postgresql-0.1.0 lib/torque/postgresql/attributes.rb