sequel_bitemporal 0.4.16 → 0.4.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -145,8 +145,8 @@ module Sequel
145
145
  end
146
146
 
147
147
  def attributes=(attributes)
148
- @current_version_values = current_version ? current_version.values : {}
149
148
  if attributes.delete(:partial_update) && !@pending_version && !new? && current_version
149
+ @current_version_values = current_version.values
150
150
  current_attributes = current_version.keys.inject({}) do |hash, key|
151
151
  hash[key] = current_version.send key
152
152
  hash
@@ -154,6 +154,8 @@ module Sequel
154
154
  current_attributes.delete :valid_from
155
155
  current_attributes.delete :valid_to
156
156
  attributes = current_attributes.merge attributes
157
+ elsif !new? && current_version
158
+ @current_version_values = current_version.values
157
159
  end
158
160
  attributes.delete :id
159
161
  @pending_version ||= model.version_class.new
@@ -301,6 +303,7 @@ module Sequel
301
303
  send(self.class.audit_updated_by_method)
302
304
  ) if audited?
303
305
  propagate_changes_to_future_versions
306
+ @current_version_values = nil
304
307
  @pending_version = nil
305
308
  end
306
309
  success
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "sequel_bitemporal"
6
- s.version = "0.4.16"
6
+ s.version = "0.4.18"
7
7
  s.authors = ["Joseph HALTER", "Jonathan TRON"]
8
8
  s.email = ["joseph.halter@thetalentbox.com", "jonathan.tron@thetalentbox.com"]
9
9
  s.homepage = "https://github.com/TalentBox/sequel_bitemporal"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_bitemporal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.16
4
+ version: 0.4.18
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: -3018429499339951723
130
+ hash: 1825248443050872731
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements:
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  segments:
138
138
  - 0
139
- hash: -3018429499339951723
139
+ hash: 1825248443050872731
140
140
  requirements: []
141
141
  rubyforge_project:
142
142
  rubygems_version: 1.8.24