avo 2.33.3.pre.1 → 2.33.3.pre.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/avo/fields/belongs_to_field.rb +4 -2
- data/lib/avo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ece1802c0aff8f4c7aa07963976459b3926348dec30e6bb626af4af3615ab079
|
4
|
+
data.tar.gz: 9cc1670145ad39ec8fb09dee7f843eebb7912f9222b66378c3a15014d8ae341e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe3867dfc4e1ba3299bbeb0ae5f4e0dbedb67d887f1a593d3565ded47c6c66df6f1ba3ed1971c212a3420f682bbd7c694121880c37f1d9f0d62f15c6d2a8baf
|
7
|
+
data.tar.gz: b30c40416024a57cf39f1ab184b6cbbbf4a5d8ddbcc4460a7fafa01199e62b4a2b8269c7775709765a0f19bae3bc64db6b1dcfadeb1842d19ff7144cee35ad05
|
data/Gemfile.lock
CHANGED
@@ -199,11 +199,13 @@ module Avo
|
|
199
199
|
def fill_field(model, key, value, params)
|
200
200
|
return model unless model.methods.include? key.to_sym
|
201
201
|
|
202
|
+
valid_model_class = BaseResource.valid_model_class params["#{polymorphic_as}_type"]
|
203
|
+
|
202
204
|
if polymorphic_as.present?
|
203
|
-
model.send("#{polymorphic_as}_type=",
|
205
|
+
model.send("#{polymorphic_as}_type=", valid_model_class)
|
204
206
|
|
205
207
|
# If the type is blank, reset the id too.
|
206
|
-
if
|
208
|
+
if valid_model_class.blank?
|
207
209
|
model.send("#{polymorphic_as}_id=", nil)
|
208
210
|
else
|
209
211
|
model.send("#{polymorphic_as}_id=", params["#{polymorphic_as}_id"])
|
data/lib/avo/version.rb
CHANGED