Module: DbSubsetter::TypeHelper

Defined in:
lib/db_subsetter/type_helper.rb

Overview

Utility module to help safely serialize types FIXME: nothing about this seems named correctly

Class Method Summary collapse

Class Method Details

.cleanup_types(row) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/db_subsetter/type_helper.rb', line 5

def self.cleanup_types(row)
  row.map do |field|
    case field
    when Date, Time then field.to_s(:db)
    else
      field
    end
  end
end