|
def dump_value_string(value) |
Can be replaced by
ActiveRecord::Base.connection.quote?
|
keys = key_values.collect{ |item| "`#{item[0]}`" }.join(", ") |
Can be replaced by
keys = key_values.collect{ |item| ActiveRecord::Base.connection.quote_column_name(item[0]) }.join(", ")
And what's rarely an issue but still, quote the table name: table_name = ActiveRecord::Base.connection.quote_table_name(object.class.table_name)
This also increases support for other databases.
dumpable/lib/dumpable/dumper.rb
Line 80 in cf9d475
Can be replaced by
ActiveRecord::Base.connection.quote?dumpable/lib/dumpable/dumper.rb
Line 73 in cf9d475
Can be replaced by
keys = key_values.collect{ |item| ActiveRecord::Base.connection.quote_column_name(item[0]) }.join(", ")And what's rarely an issue but still, quote the table name:
table_name = ActiveRecord::Base.connection.quote_table_name(object.class.table_name)This also increases support for other databases.