bullet_train-scope_validator 1.2.27 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +2 -2
- data/lib/bullet_train/scope_validator/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41d096589139f25e27a8113057036cbb208e068719fd80a6ff24502c47d53ef9
|
4
|
+
data.tar.gz: b19acbe35d22291cac0174ca7350cfc23ca6abcabbc8f0af03a2369adc3cb967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b816c3ed660f0ecac7c82b26034ac10856f42a66956ffcdcecbe004ec1ae4498885f70ff473134655d3a135b08d6f9ba9c9729fb52903314e3d4795e54535c97
|
7
|
+
data.tar.gz: 9f48accbd0ab19618f032cc4b9b44b63931f2f55ee9ad268a2838c2e895b15750744b773f7988195b1d7fcb9172c1cce80d0551a743b54a45d7376551648b304
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bullet_train-scope_validator (1.
|
4
|
+
bullet_train-scope_validator (1.3.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -39,6 +39,7 @@ PLATFORMS
|
|
39
39
|
arm64-darwin-20
|
40
40
|
arm64-darwin-21
|
41
41
|
arm64-darwin-22
|
42
|
+
x86_64-linux
|
42
43
|
|
43
44
|
DEPENDENCIES
|
44
45
|
bullet_train-scope_validator!
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ end
|
|
50
50
|
|
51
51
|
### Example Form
|
52
52
|
|
53
|
-
```
|
53
|
+
```erb
|
54
54
|
<%= form.collection_select(:customer_id, @team.customers, :id, :name) %>
|
55
55
|
```
|
56
56
|
|
@@ -101,7 +101,7 @@ end
|
|
101
101
|
|
102
102
|
If you're wondering what the connection between `validates :customer, scope: true` and `def valid_customers` is, it's just a convention that the former will call the latter based on the name of the attibute being validated. We've favored a full-blown method definition for this instead of simply passing in a proc into the validator because having a method allows us to also DRY up our form view to use the same definition of valid options, like so:
|
103
103
|
|
104
|
-
```
|
104
|
+
```erb
|
105
105
|
<%= form.collection_select(:customer_id, form.object.valid_customers, :id, :name) %>
|
106
106
|
```
|
107
107
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-scope_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Protect `belongs_to` attributes from ID stuffing.
|
14
14
|
email:
|
@@ -31,13 +31,13 @@ files:
|
|
31
31
|
- lib/bullet_train/scope_validator/version.rb
|
32
32
|
- lib/validators/scope_validator.rb
|
33
33
|
- sig/bullet_train/scope_validator.rbs
|
34
|
-
homepage: https://github.com/bullet-train-co/bullet_train-scope_validator
|
34
|
+
homepage: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-scope_validator
|
35
35
|
licenses:
|
36
36
|
- MIT
|
37
37
|
metadata:
|
38
|
-
homepage_uri: https://github.com/bullet-train-co/bullet_train-scope_validator
|
39
|
-
source_code_uri: https://github.com/bullet-train-co/bullet_train-scope_validator
|
40
|
-
post_install_message:
|
38
|
+
homepage_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-scope_validator
|
39
|
+
source_code_uri: https://github.com/bullet-train-co/bullet_train-core/tree/main/bullet_train-scope_validator
|
40
|
+
post_install_message:
|
41
41
|
rdoc_options: []
|
42
42
|
require_paths:
|
43
43
|
- lib
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubygems_version: 3.4.10
|
56
|
-
signing_key:
|
56
|
+
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Protect `belongs_to` attributes from ID stuffing.
|
59
59
|
test_files: []
|