prefixed_ids 1.5.0 → 1.5.1

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: 31ec2b1bba4416445bc96d1009fb7d982a04ad2283e26450126ce526f1fceb44
4
- data.tar.gz: ad94e3f32b9748ababe2cfe8b6e91e4b3a8ecf6e28e89dab4405bea461db5c47
3
+ metadata.gz: '0792b1628632ca08581a3e9c40214ce2eda85c22a024e84efb8864a99a9ba86f'
4
+ data.tar.gz: ee3fa57136647eeb745af0b0863cc3de1ef386a297819851fcaf98039a35938a
5
5
  SHA512:
6
- metadata.gz: 6f281373868530a41f7cadf8fd78179cad3a1be85941a1734f3eef2fb568aef6b80702b9506bb2873989ee9b3fd2137839d4f79d328e4c0f4d92394b370c508f
7
- data.tar.gz: b3d9c9fe54b7df878d122be69f591eb4ef58969804ac3af27705a5f7dc2b56a37a73ad77345b823a5d58bbd3ddbb2ef746d7802a074fa6fd2cfe1740163b4e09
6
+ metadata.gz: 22fb046b0c3ea5cf81e52bb799777b898cb90ccdd66ac6c93c4c4ede0affa10514964f02b3486b5f132394d88996d77cf19887b4692a654014d8c736fd1978f3
7
+ data.tar.gz: 7ab99d15f8d4840d894f470802f88e53398410e5370d06cbe6ca88fa619c6fca95d50cd9a2908a96096f2c177b70bcef0d7cb4143555e5fd41de42d194b2eac1
@@ -1,3 +1,3 @@
1
1
  module PrefixedIds
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
data/lib/prefixed_ids.rb CHANGED
@@ -84,6 +84,9 @@ module PrefixedIds
84
84
  class_methods do
85
85
  def find(*ids)
86
86
  prefix_ids = *ids.map do |id|
87
+ # Skip if model doesn't use prefixed ids
88
+ next id unless _prefix_id.present?
89
+
87
90
  prefix_id = _prefix_id.decode(id, fallback: _prefix_id_fallback)
88
91
  raise Error, "#{id} is not a valid prefix_id" if !_prefix_id_fallback && prefix_id.nil?
89
92
  prefix_id
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.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-22 00:00:00.000000000 Z
11
+ date: 2023-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.4.9
111
+ rubygems_version: 3.4.12
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Prefixed IDs generates IDs with friendly prefixes for your models