perry 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/perry/middlewares/model_bridge.rb +1 -1
- data/lib/perry/version.rb +1 -1
- metadata +3 -3
@@ -37,7 +37,7 @@ class Perry::Middlewares::ModelBridge
|
|
37
37
|
def update_model_after_save(response, model)
|
38
38
|
model.saved = response.success
|
39
39
|
if model.saved
|
40
|
-
if model.new_record?
|
40
|
+
if model.new_record? && !model.read_adapter.nil?
|
41
41
|
key = response.model_attributes[model.primary_key]
|
42
42
|
raise Perry::PerryError.new('primary key not included in response') if key.nil?
|
43
43
|
model.send("#{model.primary_key}=", key)
|
data/lib/perry/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: perry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis Petticrew
|