perry 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -3,7 +3,7 @@ module Perry
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 5
6
- TINY = 1
6
+ TINY = 2
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
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: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 1
10
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Travis Petticrew