Module: ArJdbc::PostgreSQL::Column

Included in:
ActiveRecord::ConnectionAdapters::PostgreSQLColumn
Defined in:
lib/arjdbc/postgresql/adapter.rb

Overview

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/arjdbc/postgresql/adapter.rb', line 24

def self.included(base)
  class << base
    attr_accessor :money_precision
    def string_to_time(string)
      return string unless String === string

      case string
      when 'infinity' then 1.0 / 0.0
      when '-infinity' then -1.0 / 0.0
      else
        super
      end
    end
  end
end