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



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/arjdbc/postgresql/adapter.rb', line 28

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