govuk_content_models 13.2.0 → 13.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 13.2.1
2
+
3
+ * Assigning an edition doesn't require the entire edition
4
+ to be validated and saved. Hence replacing it with a
5
+ set operation.
6
+
1
7
  ## 13.2.0
2
8
 
3
9
  * Denormalising users doesn't require the entire edition
@@ -139,13 +139,8 @@ module WorkflowActor
139
139
  end
140
140
 
141
141
  def assign(edition, recipient)
142
- edition.assigned_to_id = recipient.id
143
-
144
- # We're saving the edition here as the controller treats assignment as a
145
- # special case.
146
- # The controller saves the publication, then updates assignment.
147
- edition.save! and edition.reload
148
- record_action edition, __method__, recipient: recipient
142
+ edition.set(:assigned_to_id, recipient.id)
143
+ record_action edition.reload, __method__, recipient: recipient
149
144
  end
150
145
 
151
146
  private
@@ -1,4 +1,4 @@
1
1
  module GovukContentModels
2
2
  # Changing this causes Jenkins to tag and release the gem into the wild
3
- VERSION = "13.2.0"
3
+ VERSION = "13.2.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.2.0
4
+ version: 13.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-02 00:00:00.000000000 Z
12
+ date: 2014-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bson_ext
@@ -468,7 +468,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
468
468
  version: '0'
469
469
  segments:
470
470
  - 0
471
- hash: -3600422238156997598
471
+ hash: -2244656321309357788
472
472
  required_rubygems_version: !ruby/object:Gem::Requirement
473
473
  none: false
474
474
  requirements:
@@ -477,7 +477,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
477
477
  version: '0'
478
478
  segments:
479
479
  - 0
480
- hash: -3600422238156997598
480
+ hash: -2244656321309357788
481
481
  requirements: []
482
482
  rubyforge_project:
483
483
  rubygems_version: 1.8.23