method

array_to_string

rails latest stable - Class: ActiveRecord::ConnectionAdapters::PostgreSQLColumn::Cast

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.

array_to_string(value, column, adapter)
public

No documentation available.

# File activerecord/lib/active_record/connection_adapters/postgresql/cast.rb, line 70
        def array_to_string(value, column, adapter)
          casted_values = value.map do |val|
            if String === val
              if val == "NULL"
                "\"#{val}\""
              else
                quote_and_escape(adapter.type_cast(val, column, true))
              end
            else
              adapter.type_cast(val, column, true)
            end
          end
          "{#{casted_values.join(',')}}"
        end