prefixed_ids 1.2.1 → 1.2.2

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: e542fdd356a7d0a1ccc8ad8ca90cc2d218dd4d22e01b2cd82c07ab9e36c52141
4
- data.tar.gz: 9c788fc9bf605656ddcfc1c3c3c854eb9fbef1068b1e9b963b6dfa4f6bb72cbe
3
+ metadata.gz: 38b6a59341fa7c4d02fdaba7f6eb738cdb5730a9aa6caca89ffb89bfa9dc4740
4
+ data.tar.gz: ae7de74cf643796ce5fdafe5e0b7d0db98cf60b761a52a960ad1122c14028b0a
5
5
  SHA512:
6
- metadata.gz: 933bfccd3abb8e3f1c1dd4df15a4babe8e530fce7c3afab6e998db177c61e433fca20bafb8849b73795a961977e4a8e23fd9580f2aec80c8fc868e063e1275f2
7
- data.tar.gz: d1c9e97f317478f2d2f2b4d63f3f5606f5d5eb9c16548d9404bd62c984c40d4bae4db6e544ac73917a8795a82f72e1625825741f5b502650f05979e406a9b3b6
6
+ metadata.gz: 428331d371bbcc87c9d092297b315476ccd9e62548ff59efef59cb7a3574b256247f4dacf6c1edc3c2f72e553a742033493f51587af264707a77ca3d797cea9e
7
+ data.tar.gz: af9b8a1f596b9b6d1720e8ec71b267421d6c0df5fd661e0b3b76765d8606bb929e5bf2a2bbe81a9fd853290e4e1a844ca7d3a63ad25001da9d9eb9beb3a98c0b
data/lib/prefixed_ids.rb CHANGED
@@ -74,6 +74,16 @@ module PrefixedIds
74
74
  def find(*ids)
75
75
  super(*ids.map { |id| _prefix_id.decode(id, fallback: true) })
76
76
  end
77
+
78
+ def relation
79
+ super.tap { |r| r.extend ClassMethods }
80
+ end
81
+
82
+ def has_many(*args, &block)
83
+ options = args.extract_options!
84
+ options[:extend] = Array(options[:extend]).push(ClassMethods)
85
+ super(*args, **options, &block)
86
+ end
77
87
  end
78
88
  end
79
89
 
@@ -1,3 +1,3 @@
1
1
  module PrefixedIds
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prefixed_ids
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2021-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails