pg_rails 7.0.8.pre.alpha.12 → 7.0.8.pre.alpha.13
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbc26d936f0bc92d89ee7125589969f980d4f4916bb49da05772425291b94306
|
4
|
+
data.tar.gz: d144737ca5915119e635c8cf5b9cf9f78ad466c68ed7be79c0487f2e39e59c41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d050775c0f3f3fec73e49eb17a25b9eb4aae187839045fa5323cefe842cf664806e1aaf9c43e896f517a8ec4a4a9d736c3a988c3398995feeb85fb35564820be
|
7
|
+
data.tar.gz: cb652380ec0912c029522440634ce22016a7d6edf7d6b073e559664d96e181fcc229a3aa6e1b9861ab47107f217348b7e7be275874babb35f3a6494d0080653b
|
@@ -211,7 +211,9 @@ module PgEngine
|
|
211
211
|
if Object.const_defined?('FriendlyId') && @clase_modelo.is_a?(FriendlyId)
|
212
212
|
@clase_modelo.friendly.find(params[:id])
|
213
213
|
elsif @clase_modelo.respond_to? :find_by_hashid
|
214
|
-
|
214
|
+
# rubocop:disable Rails/DynamicFindBy
|
215
|
+
@clase_modelo.find_by_hashid!(params[:id])
|
216
|
+
# rubocop:enable Rails/DynamicFindBy
|
215
217
|
else
|
216
218
|
@clase_modelo.find(params[:id])
|
217
219
|
end
|
@@ -3,6 +3,12 @@
|
|
3
3
|
# NOTE: to have a dev-mode tool do its thing in production.
|
4
4
|
Dotenv.load
|
5
5
|
|
6
|
+
model_paths = begin
|
7
|
+
JSON.parse(ENV['MODEL_PATHS'])
|
8
|
+
rescue JSON::ParserError
|
9
|
+
ENV['MODEL_PATHS']
|
10
|
+
end
|
11
|
+
|
6
12
|
if Rails.env.development?
|
7
13
|
require 'annotate'
|
8
14
|
task :set_annotation_options do
|
@@ -23,7 +29,7 @@ if Rails.env.development?
|
|
23
29
|
'show_complete_foreign_keys' => 'false',
|
24
30
|
'show_indexes' => 'false',
|
25
31
|
'simple_indexes' => 'true',
|
26
|
-
'model_dir' =>
|
32
|
+
'model_dir' => model_paths,
|
27
33
|
# 'model_dir' => ['app/models', 'app/overrides'],
|
28
34
|
# 'model_dir' => 'app/models',
|
29
35
|
'root_dir' => '',
|
data/pg_rails/lib/version.rb
CHANGED