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 +4 -4
- data/lib/prefixed_ids.rb +10 -0
- data/lib/prefixed_ids/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38b6a59341fa7c4d02fdaba7f6eb738cdb5730a9aa6caca89ffb89bfa9dc4740
|
4
|
+
data.tar.gz: ae7de74cf643796ce5fdafe5e0b7d0db98cf60b761a52a960ad1122c14028b0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/prefixed_ids/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2021-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|