pragma 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b663eb5cb1de8f44179099fb2a267035724f5162
4
- data.tar.gz: c99f08ef93efae3b8992c2a9bcd7b52651ffb64d
3
+ metadata.gz: 1427288bd6684bc328bd89cb3c533669d7f983a8
4
+ data.tar.gz: 0d581992a20a18f564b1cfeb86ee7a01d5385afc
5
5
  SHA512:
6
- metadata.gz: e254786bb48ffbb15ce69a8932a7153f2473bb009c2e1778a3bb64ed67a2e8fe654536bca19bd74b4592718db16993fd9ddca26840b1fda64d040710132a7279
7
- data.tar.gz: 78a2f00a1af9fcab9036f4b0640f4634722518faaf2927e7530e101a9fc0d28a8e59fec0f4eb2589b80a64ab53315f397a21e7d4823d7746681fdc214b0ce2b9
6
+ metadata.gz: e2498df272683877a28ec0f4de9807c603c0acb7a7b3173174b950ccfccb964f546999076a6b444e48a26069b63f3dea1c8bdcb9e64979c2810eb66f4580720f
7
+ data.tar.gz: '0906f1c390d99827258becd682f4dec92dffca7211758bf0df927e04706268ae90980cb0235e6b421ad9c39f45dab0192e71fabb679e6a3a1d07cbc612f3cbc1'
@@ -15,7 +15,10 @@ module Pragma
15
15
  validate! context.contract
16
16
  authorize! context.contract
17
17
 
18
- context.contract.save
18
+ context.contract.save do |hash|
19
+ context.record.assign_attributes(hash)
20
+ context.record.save!
21
+ end
19
22
 
20
23
  respond_with status: :created, resource: decorate(context.record)
21
24
  end
@@ -15,7 +15,9 @@ module Pragma
15
15
  validate! context.contract
16
16
  authorize! context.contract
17
17
 
18
- context.contract.save
18
+ context.contract.save do |hash|
19
+ context.record.update! hash
20
+ end
19
21
 
20
22
  respond_with resource: decorate(context.record)
21
23
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Pragma
3
- VERSION = '1.1.2'
3
+ VERSION = '1.2.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-19 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pragma-operation