lib/ImportSupport.rb
def blank_out_fields(record, fields)
    fields.to_a.each do |field|
      record[field.to_sym] = '' if record[field.to_sym].nil?
    end
    record
  end
## Blank out fields if record[field] is nil
## It only reads syms in fields to prevent reading injected fields on record
Blank out fields if record[field] is nil
It only reads syms in fields to prevent reading injected fields on record
Blank out fields if record [ field ] is nil It only reads syms in fields to prevent reading injected fields on record
def blank_out_fields(record, fields)
    fields.to_a.each do |field|
      record[field.to_sym] = '' if record[field.to_sym].nil?
    end
    record
  end
def blank_out_fields ( record , fields ) fields . to_a . each do | field | record [ field . to_sym ] = '' if record [ field . to_sym ] . nil? end record end
Blank out fields if record[field] is nil
It only reads syms in fields to prevent reading injected fields on record
Blank out fields if record [ field ] is nil It only reads syms in fields to prevent reading injected fields on record
record
fields