Sha256: 5076b70a37e8ce9937b802debe63010749ec3c68885e5e5201010359778520e0

Contents?: true

Size: 190 Bytes

Versions: 10

Compression:

Stored size: 190 Bytes

Contents

class Hash
  def sorted_column_names
    keys.sort_by { |x| x.to_s }
  end
  def insert_values_sql
    res = sorted_column_names.map { |x| "'#{self[x]}'" }.join(",")
    "(#{res})"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
GFunk911-dataload-0.8.0 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.8.1 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.8.2 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.8.3 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.8.4 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.8.5 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.9.0 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.9.1 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.9.2 lib/dataload/ext/active_record.rb
GFunk911-dataload-0.9.4 lib/dataload/ext/active_record.rb