makwa 0.2.0 → 0.2.1

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: 2da52aacefd38c1922e5e8b48277fca8106997a068b682d93698bd9e444da41f
4
- data.tar.gz: a506c6b8ae75f3d093afdf455b84733f0d0984843561dde099bbbb9ffddc7e91
3
+ metadata.gz: a01474a6d7d669f7d02f6ddec9ab653710b4215399e83a429a099b520122838b
4
+ data.tar.gz: 53d47eff5c8f981119af924a15f6d93a23435af552edb14ee66216e598979ec9
5
5
  SHA512:
6
- metadata.gz: 8784e825031765550dce4b56c82aae5a872d403cf14f444cdb0a2afb00fd2603e14f28910a92f3415b60df351820a17f738264eb6bf3bacd050f3ac21ee79c43
7
- data.tar.gz: ea5dde94eca0a95abda600e4bd8f129dc63413a855cdf3ffb9ee5f15176ee7f1edcd368216265aff272def00ca4795b647f7667bd6bbe58ec3a742ab361274bd
6
+ metadata.gz: e20a524264523fdbdc2715994a06ce34d52ca8761f9a8bff5b1a51d92e463a7f5d9850bc35a944c3b67898a82d5530c3512e70497137da571d2240623247e86e
7
+ data.tar.gz: 88833f8324ad7167e89af8b91d9c71b505b516b7502de9ac74fe70d213e5c69d6b586055f24bb1a89740d46edfc7400d051f2e2d49437cd7217c1e0d88a7b260
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2021-11-03
4
+
5
+ - Fixes bug where the `returning` attribute was not ignored correctly when assigning attrs under certain error conditions.
6
+
3
7
  ## [0.2.0] - 2021-10-27
4
8
 
5
9
  - Adds implementation
@@ -46,10 +46,11 @@ module Makwa
46
46
  # Run validations (explicitly, don't rely on #valid?)
47
47
  validate
48
48
  if errors_any?
49
+ return_filter = self.class.instance_variable_get(:@return_filter)
49
50
  # Add errors and values to the result object (so that the form can render them) and return the result object
50
51
  return result
51
52
  .tap { |r| r.errors.merge!(errors) }
52
- .tap { |r| r.assign_attributes(inputs.except(@return_filter)) }
53
+ .tap { |r| r.assign_attributes(inputs.except(return_filter)) }
53
54
  end
54
55
 
55
56
  # Otherwise run the body of the interaction (along with any callbacks) ...
data/lib/makwa/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Makwa
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Hund
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-27 00:00:00.000000000 Z
12
+ date: 2021-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: active_interaction