forest_liana 2.10.2 → 2.10.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '0768700d7184380895f8f86daee940a6986a88d9'
4
- data.tar.gz: f16bd6401269bebdc277f810d53c6d8d6c750a87
3
+ metadata.gz: bae0277792e58d89991ca850aef73ae699aa9af9
4
+ data.tar.gz: 80e1acf58e76f8824c6efe056e5033f3c309d44e
5
5
  SHA512:
6
- metadata.gz: '00995e4ad5f5df2c0da4a76252d15bc0ab96388ee6493ca025ee76ccfd90dbfa0f219795289ddb73a2bc5b0f3cbee4217758b58a365871411c5d8703a34df1a4'
7
- data.tar.gz: be06b222f864eeaec1b69ce34416df819367bae6ad235f4ebd2099d11586bf5f7cc6fafa4ca5d273aaad2d4ab99f585d7f3de6d8fac2aaa07b96948e079f8bcc
6
+ metadata.gz: b84bcb0fc502d931cdb4a1863fbcda05bc48aaf337355ec965eeda7e90eecabae4281690d7221dd802d58de94686f1c09b203ead9a369ad8aa9dc94302c0d767
7
+ data.tar.gz: f5797b8083523555b5c82b9aa90116458d27195e7121421b3810f3db2c0cc8385f344544c9088f730cc33f1b877ef3edd3803815240069d60171caf841f0eeff
@@ -49,6 +49,17 @@ module ForestLiana
49
49
 
50
50
  error = configure_forest_cors unless ENV['FOREST_CORS_DEACTIVATED']
51
51
 
52
+ def eager_load_active_record_descendants app
53
+ # HACK: Force the ActiveRecord descendants classes from ActiveStorage to load for
54
+ # introspection.
55
+ if defined? ActiveStorage
56
+ ActiveStorage::Blob
57
+ ActiveStorage::Attachment
58
+ end
59
+
60
+ app.eager_load!
61
+ end
62
+
52
63
  config.after_initialize do |app|
53
64
  if !Rails.env.test? && !rake?
54
65
  if error
@@ -56,7 +67,7 @@ module ForestLiana
56
67
  "domains for CORS constraint:\n#{error}"
57
68
  end
58
69
 
59
- app.eager_load!
70
+ eager_load_active_record_descendants(app)
60
71
 
61
72
  if database_available?
62
73
  # NOTICE: Do not run the code below on rails g forest_liana:install.
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "2.10.2"
2
+ VERSION = "2.10.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.2
4
+ version: 2.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda