avo 2.33.3.pre.2 → 2.33.3

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: ece1802c0aff8f4c7aa07963976459b3926348dec30e6bb626af4af3615ab079
4
- data.tar.gz: 9cc1670145ad39ec8fb09dee7f843eebb7912f9222b66378c3a15014d8ae341e
3
+ metadata.gz: fc196e3fee2cace52de6c29deaf6cb48be0d0866b09150b92f2c3242a4e86dd5
4
+ data.tar.gz: 7b01b1d99127feeac10b1abaca6c31b764395545c12ddece4015c2c10f29fc57
5
5
  SHA512:
6
- metadata.gz: dbe3867dfc4e1ba3299bbeb0ae5f4e0dbedb67d887f1a593d3565ded47c6c66df6f1ba3ed1971c212a3420f682bbd7c694121880c37f1d9f0d62f15c6d2a8baf
7
- data.tar.gz: b30c40416024a57cf39f1ab184b6cbbbf4a5d8ddbcc4460a7fafa01199e62b4a2b8269c7775709765a0f19bae3bc64db6b1dcfadeb1842d19ff7144cee35ad05
6
+ metadata.gz: d4b85f71610df01c584d9356f005184a67bc5a1baa4db74f0e74411427f01d35fd151f9b3c8258fdae85b3f37d4cbaa153ce5a77b769a316fe12e4c3405c896e
7
+ data.tar.gz: 936f608896664e6848c0ca1d059407285f4b9d09841dd16e6454a651df87ca76126cd7ff04cf4144c57a57215c080f8f7c9aa2b500554594336a361dd3e39dc7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.33.3.pre.2)
4
+ avo (2.33.3)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
@@ -199,7 +199,7 @@ 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"]
202
+ valid_model_class = valid_polymorphic_class params["#{polymorphic_as}_type"]
203
203
 
204
204
  if polymorphic_as.present?
205
205
  model.send("#{polymorphic_as}_type=", valid_model_class)
@@ -217,6 +217,12 @@ module Avo
217
217
  model
218
218
  end
219
219
 
220
+ def valid_polymorphic_class(possible_class)
221
+ types.find do |type|
222
+ type.to_s == possible_class.to_s
223
+ end
224
+ end
225
+
220
226
  def database_id
221
227
  # If the field is a polymorphic value, return the polymorphic_type as key and pre-fill the _id in fill_field.
222
228
  return "#{polymorphic_as}_type" if polymorphic_as.present?
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.33.3.pre.2" unless const_defined?(:VERSION)
2
+ VERSION = "2.33.3" 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.2
4
+ version: 2.33.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -1713,7 +1713,6 @@ files:
1713
1713
  - config/credentials.yml.enc
1714
1714
  - config/i18n-tasks.yml
1715
1715
  - config/initializers/pagy.rb
1716
- - config/master.key
1717
1716
  - config/routes.rb
1718
1717
  - config/spring.rb
1719
1718
  - db/factories.rb
@@ -1977,9 +1976,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1977
1976
  version: 2.6.0
1978
1977
  required_rubygems_version: !ruby/object:Gem::Requirement
1979
1978
  requirements:
1980
- - - ">"
1979
+ - - ">="
1981
1980
  - !ruby/object:Gem::Version
1982
- version: 1.3.1
1981
+ version: '0'
1983
1982
  requirements: []
1984
1983
  rubygems_version: 3.3.3
1985
1984
  signing_key:
data/config/master.key DELETED
@@ -1 +0,0 @@
1
- 2aeb23d82b909d9c6b5abb62f7058c2a