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: 84eace9e9d023c54401e822df64d253dd94dcdf3831fd19ce1c77bb0ad674541
4
- data.tar.gz: 3c1b74610da49e737f4fba5d9b89737a529650831278f95fcfc4c66ebd32a1f6
3
+ metadata.gz: fbc26d936f0bc92d89ee7125589969f980d4f4916bb49da05772425291b94306
4
+ data.tar.gz: d144737ca5915119e635c8cf5b9cf9f78ad466c68ed7be79c0487f2e39e59c41
5
5
  SHA512:
6
- metadata.gz: 2c350c91dc1f91c4eb6c2b7ad866296d1057c89637ec3b45922ec89a0720d7942a4706a0ab3659adabb34da2a8f681d56367a722b5d7d4f1595210bb3bda12dc
7
- data.tar.gz: '0806e415216083b9afe67adb247328764964cd537351a4406e88c7768946b71fe661de0a469f3d61af215d85706312d772e12cf52b03f65c083cb773cf06d687'
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
- @clase_modelo.find_by!(hashid: params[:id])
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' => ENV['MODEL_PATHS'],
32
+ 'model_dir' => model_paths,
27
33
  # 'model_dir' => ['app/models', 'app/overrides'],
28
34
  # 'model_dir' => 'app/models',
29
35
  'root_dir' => '',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.12'
4
+ VERSION = '7.0.8-alpha.13'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.pre.alpha.12
4
+ version: 7.0.8.pre.alpha.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso