seeder 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/seeder.rb +1 -1
- data/lib/seeder/version.rb +1 -1
- metadata +4 -4
data/lib/seeder.rb
CHANGED
@@ -48,7 +48,7 @@ class Seeder
|
|
48
48
|
conditions = keys.map { |k| "#{quote(k)} = #{value_to_sql(existing.send(k))}" }.join(" AND ")
|
49
49
|
%(UPDATE #{ar_model.table_name} SET #{updates} WHERE #{conditions})
|
50
50
|
else
|
51
|
-
columns = relevant_keys.join(", ")
|
51
|
+
columns = relevant_keys.map { |k| quote(k) }.join(", ")
|
52
52
|
inserts = attributes.slice(*relevant_keys).values.map { |v| value_to_sql(v) }.join(", ")
|
53
53
|
%(INSERT INTO #{ar_model.table_name} (#{columns}) VALUES (#{inserts}))
|
54
54
|
end
|
data/lib/seeder/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seeder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-20 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
|
-
requirement: &
|
17
|
+
requirement: &2165419640 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
version: 2.6.0
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2165419640
|
26
26
|
description: Keep your app's seed data in one file and update it easily, while respecting
|
27
27
|
key constraints
|
28
28
|
email: bsingh@wegowise.com
|