transform arrays from rails4 and type_cast_code too

fix passing type

require to_wkt_ to avoid method missing error