validate-params 0.12.3 → 0.12.4

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: 42490d834870ce9c5b7ee67062d1ad59c2066b168f51d7d554e920e25ec758c4
4
- data.tar.gz: ca97ac17ee9acbdaa75dbbf92fccfd7e71950a2f3fa1b993e22a3064daac9f23
3
+ metadata.gz: 49259451d9cfaab7442c2efbebcf863fd95ffaa5939d20bfda60f74a790ebcde
4
+ data.tar.gz: 93b889e507e6a14faa28715ce53fc0a8609dd4903a7b1400a4398fad401d9105
5
5
  SHA512:
6
- metadata.gz: c3cefceece707a82400448cb82cc20281b151ca665da6b1b27d8b85daa89188a8e686669e0058f68f6690b68224e334d384bb33381ea39a8ffc93c2a53db6495
7
- data.tar.gz: adba082bd06dff4c1d758de2c84ecfe150e86d8099fcefa7b11f057919a452d4cfa49632332c0f9cfa415c2c9c075a123a62ca0cc687e74fa5b6812459ad1a01
6
+ metadata.gz: feb837f5b782d6aa7715b8cc4f508a4c5280221ce4760e818c7b39e10955340db62aaad82ac512257ac01071ca66f6b7246af7de8f4570e3f130acf78a74a7c3
7
+ data.tar.gz: 80276c1107d9fd4395b4e3e9cd9bc0fa472b5ea22eedd3303e26521650e7bb25ae56d37285641ace765c6d9f8765345e9b0117538c070be71a83dac64e425b77
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [0.12.3] - 2024-04-14
2
2
 
3
+ - Revert 0.12.2 changes
4
+
5
+ ## [0.12.3] - 2024-04-14
6
+
3
7
  - Default option for Integer type should support empty string as well
4
8
 
5
9
  ## [0.11.0] - 2023-11-04
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- validate-params (0.12.3)
4
+ validate-params (0.12.4)
5
5
  activesupport (>= 6.1.0)
6
6
  i18n (>= 1.6)
7
7
 
@@ -23,29 +23,6 @@ module ValidateParams
23
23
  class_methods do
24
24
  attr_reader :params_validations
25
25
 
26
- # When controller inherits from other controller, we need to copy the validations.
27
- #
28
- # Usage example:
29
- #
30
- # class ParentController < ApplicationController
31
- # validate_params_for :index do |p|
32
- # p.param :param1, Integer, min: 1, max: 10
33
- # p.param :param2, Integer, min: 10, max: 20
34
- # end
35
- # end
36
- #
37
- # class ChildController < ParentController
38
- # validate_params_for :index do |p|
39
- # p.param :param1, Integer, min: 0, max: 5
40
- # end
41
- # end
42
- #
43
- # Here in ChildController, the param1 validation will be overridden, but validation for param2 will remain unchanged.
44
- #
45
- def inherited(child)
46
- child.instance_variable_set("@params_validations", @params_validations.deep_dup)
47
- end
48
-
49
26
  def validate_params_for(action, options = {})
50
27
  options[:format] ||= :json
51
28
  @params_validations ||= {}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ValidateParams
4
- VERSION = "0.12.3"
4
+ VERSION = "0.12.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validate-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - dcherevatenko