lite-form 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 332e38b7f8b9e39c80cf2e13643938e14338bc907d6b503f9b07a02dd451748e
4
- data.tar.gz: b5741f66ae2607c67015d8c52ad2ff3661ec37c97cf2076772a33d3adfa6801b
3
+ metadata.gz: 71ac196f9262cabced3c3e7bc7e588e7bce698a4abbd7aa5a956787335993179
4
+ data.tar.gz: 33a648e006ccd5af8431f0a5d079db55cf10aad688eedb4fe16f65fdba380c34
5
5
  SHA512:
6
- metadata.gz: 721309484a981b86df4b9f33a5b8e1db0a5a5588e47a70d36c88dc1fa988df86ad8c543db3e06316ec25d0f9ce9746404e8c4c237401b9e099ab3bf91dac6339
7
- data.tar.gz: b4355a52c6175f59d881b812655c9690c34e6d3270717b3b29ff9c904134ac48c0c27201b406b36892a69427a648af3dd2fdaa3a4bf6b295124b4a2454ec2082
6
+ metadata.gz: d1bd7cf4427423d2d3f6958e3c39d02de7ccdca6b06918c671e3ef3102e9deedc77dad59cef12f5897040e36a6848d2af0d06eee27783128eef08a4c3c323a51
7
+ data.tar.gz: 629f2dc0ae0728b002434fb890caa5d9d3f5589800938e9358e114319a358559fe73dac299481ebbbf663b38a64f25d509e83a3751a0098fab87081f3c0fa4ef
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2019-09-16
10
+ ### Changed
11
+ - Changed create propagation to check errors instead of persistence
12
+
9
13
  ## [1.0.1] - 2019-09-12
10
14
  ### Fixed
11
15
  - Fixed issue where create propagation was being returned without errors
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-form (1.0.1)
4
+ lite-form (1.0.2)
5
5
  activemodel
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -77,8 +77,11 @@ class UserForm < ApplicationForm
77
77
  end
78
78
 
79
79
  def update_action
80
- user = User.find(attributes[:id])
81
- update_and_return!(user, attributes.slice(:id))
80
+ ActiveRecord::Base.transaction do
81
+ user = User.find(attributes[:id])
82
+ update_and_return!(user, attributes.slice(:id))
83
+ update_and_return!(user.settings, tour: false)
84
+ end
82
85
  end
83
86
 
84
87
  def prepend_signature!
@@ -16,7 +16,7 @@ module Lite
16
16
 
17
17
  def create_and_return!(klass, params)
18
18
  klass = klass.create(params)
19
- merge_errors!(klass) unless klass.persisted?
19
+ merge_errors!(klass) unless klass.errors.empty?
20
20
  klass
21
21
  end
22
22
 
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Form
5
5
 
6
- VERSION ||= '1.0.1'
6
+ VERSION ||= '1.0.2'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-form
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-12 00:00:00.000000000 Z
11
+ date: 2019-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel