ca-validation 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f56e61fe407c5adbc3260fa5a9d9b74155d534c299616b3c2d6ed5fbb3df95bd
4
- data.tar.gz: c0173404796bf39a864c5e3538bb2476241f682c210b7f21dbb2064404a3c265
3
+ metadata.gz: af4b07056a09c69e9faab3dd668ff56d136bd50f104255ba3a439e110b941ef0
4
+ data.tar.gz: 1a2390f622198e41f55f4bdfe3b265912e5ad369fd935af506715d800449df1d
5
5
  SHA512:
6
- metadata.gz: 6664c3fb4cd296e177de4ee1ea8bb0735de976b7b841d331b16b61c87c1aea7d87f92beddc0d2f271eca8c7888767d87172ec42de2f22cfc69a29fb216f0f17e
7
- data.tar.gz: 9e4642b2adeeff60b3920ebf137994e1ecae0d3ea325049dce33720b805089edc9141560412ab77ded6e69fc7de95c4fa48d90ca79851d8ff2cb8c6e153b8b2c
6
+ metadata.gz: ae6e4931daeebe24b60e6211fff6e47e8bfb21922d0ecf00758a078c05b65cffa76c108cba2bc280d068121ddc4666b04681e1eaeba9e7dd1f0ce0ae479e55ee
7
+ data.tar.gz: cafb8f9a50b1dbba9eaa9a65805647c567d64a243acd6e858280d62b5e71fbd3644bce171365fd1665a8f92e8d341340b67c642d51c53d141db4e229e42364c1
@@ -1,16 +1,17 @@
1
1
  module ActionController
2
2
  class Parameters
3
3
  def valid?(validator)
4
- @result = validator.call(permit!.to_hash)
4
+ dup_params = deep_dup
5
+ @result = validator.call(dup_params.permit!.to_hash)
5
6
  @result.errors.empty?
6
7
  end
7
8
 
8
- def errors
9
- @result.errors
9
+ def errors(full: false)
10
+ @result.messages(full: full)
10
11
  end
11
12
 
12
- def full_messages
13
- @result.messages(full: true)
13
+ def result
14
+ @result.to_hash
14
15
  end
15
16
  end
16
17
  end
@@ -1,5 +1,5 @@
1
1
  module Ca
2
2
  module Validation
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ca-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ippachi