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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cbfff8cdd5a6b367626522263ad2c5f2260e5d3f18b4d303136a3bee9661054
4
- data.tar.gz: 2d98da5cf89746d1d05abb2306b1f9c69ec2025ef9f48c307807e80105371e4f
3
+ metadata.gz: ece1802c0aff8f4c7aa07963976459b3926348dec30e6bb626af4af3615ab079
4
+ data.tar.gz: 9cc1670145ad39ec8fb09dee7f843eebb7912f9222b66378c3a15014d8ae341e
5
5
  SHA512:
6
- metadata.gz: 46a36d35b4316a92c327505769a9e7dcf1275e0af27ef8ce87d418f76b78f0b4d7cad14da0fc6d853aa2c3fd6ded5cdb73cf6b71c5560a1d15e4f4c86fc098a6
7
- data.tar.gz: fc517cad0575f3dbee145455f2a81bba95febb42c7073d8c41e86807b8aad5d61caf2728b24f02cc4411badd85202b780005920a1630167ab638d5a17034c676
6
+ metadata.gz: dbe3867dfc4e1ba3299bbeb0ae5f4e0dbedb67d887f1a593d3565ded47c6c66df6f1ba3ed1971c212a3420f682bbd7c694121880c37f1d9f0d62f15c6d2a8baf
7
+ data.tar.gz: b30c40416024a57cf39f1ab184b6cbbbf4a5d8ddbcc4460a7fafa01199e62b4a2b8269c7775709765a0f19bae3bc64db6b1dcfadeb1842d19ff7144cee35ad05
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.33.3.pre.1)
4
+ avo (2.33.3.pre.2)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
@@ -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=", params["#{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 params["#{polymorphic_as}_type"].blank?
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
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.33.3.pre.1" unless const_defined?(:VERSION)
2
+ VERSION = "2.33.3.pre.2" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.33.3.pre.1
4
+ version: 2.33.3.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin