forest_liana 2.10.2 → 2.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/forest_liana/engine.rb +12 -1
- data/lib/forest_liana/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bae0277792e58d89991ca850aef73ae699aa9af9
|
|
4
|
+
data.tar.gz: 80e1acf58e76f8824c6efe056e5033f3c309d44e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b84bcb0fc502d931cdb4a1863fbcda05bc48aaf337355ec965eeda7e90eecabae4281690d7221dd802d58de94686f1c09b203ead9a369ad8aa9dc94302c0d767
|
|
7
|
+
data.tar.gz: f5797b8083523555b5c82b9aa90116458d27195e7121421b3810f3db2c0cc8385f344544c9088f730cc33f1b877ef3edd3803815240069d60171caf841f0eeff
|
data/lib/forest_liana/engine.rb
CHANGED
|
@@ -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
|
|
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.
|
data/lib/forest_liana/version.rb
CHANGED