active_table 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_table/base.rb +2 -2
- data/lib/active_table/version.rb +1 -1
- metadata +3 -3
data/lib/active_table/base.rb
CHANGED
@@ -36,9 +36,9 @@ module ActiveTable
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def self.generate_insert_sql_for_hash(connection, table_name, params)
|
39
|
-
keys = params.keys.map {|k| connection.
|
39
|
+
keys = params.keys.map {|k| connection.quote_column_name(k.to_s)}.join(", ")
|
40
40
|
values = params.values.map {|v| connection.quote(v.to_s)}.join(", ")
|
41
|
-
"INSERT INTO #{connection.
|
41
|
+
"INSERT INTO #{connection.quote_table_name(table_name.to_s)} (#{keys}) VALUES (#{values})"
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.reset_table_information
|
data/lib/active_table/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Case Commons LLC
|