bullet_train-scope_validator 1.2.26 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/bullet_train/scope_validator/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0d719fb23e8b0744b1636c98231b972a1e122d6147d7655e0d4c7200c0f58a9
|
4
|
+
data.tar.gz: eb5b2d8da9baefde57599518231e89c6563614bb2fe7a85c29e19d7661da7715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6de65b02ce6f4febc3d82bfcef90b5480d45cfe60006e8a7a7edc4eac8db1cce1748e20cfc51a030d44bc40e76044a5872f704a421788d57aacf4d7b449f95fe
|
7
|
+
data.tar.gz: 19afd4daa752d2841348c60a985a3dd32b61df38d819b05a4d398e7db010a72eb9a9d6f304ae0b2cc83ccf62e6a6bd1584e7b9569c6c513e633b07d134e64149
|
data/Gemfile.lock
CHANGED
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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Protect `belongs_to` attributes from ID stuffing.
|
14
14
|
email:
|
@@ -31,12 +31,12 @@ 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
|
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
40
|
post_install_message:
|
41
41
|
rdoc_options: []
|
42
42
|
require_paths:
|