rest_framework 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rest_framework/controller_mixins/models.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99cd96572042191fde2bb7fa5b004ac07e193c103c8c18342ea3fed3f50e1be7
|
4
|
+
data.tar.gz: 2276cedd0fc4b205e0c253df36dbba2a45fcf889e81a214dcda2d435cc690ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdcd6eb5262ffcbcf91692389ce78d0560b9d3e2479eabd00ab296707500a3b2611ec733a085c12df363d31f4d41421ac87a102d365810a04db9973276810b6b
|
7
|
+
data.tar.gz: 37504ff11623057cc5b1c7e5bfdc0c688ca95964c72a312fd5adeb71fc7cb11acd0937b3a4f6186d8b0c71b5730cbff521dd098f9689c9e6718b6c5628f9edc0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.1
|
@@ -266,6 +266,13 @@ module RESTFramework::BaseModelControllerMixin
|
|
266
266
|
# Update `required` if we find a presence validator.
|
267
267
|
metadata[:required] = true if kind == :presence
|
268
268
|
|
269
|
+
# Resolve procs (and lambdas), and symbols for certain arguments.
|
270
|
+
if options[:in].is_a?(Proc)
|
271
|
+
options = options.merge(in: options[:in].call)
|
272
|
+
elsif options[:in].is_a?(Symbol)
|
273
|
+
options = options.merge(in: model.send(options[:in]))
|
274
|
+
end
|
275
|
+
|
269
276
|
metadata[:validators] ||= {}
|
270
277
|
metadata[:validators][kind] ||= []
|
271
278
|
metadata[:validators][kind] << options
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory N. Schmit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|