hashid-rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hashid/rails.rb +2 -6
- data/lib/hashid/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b2ea9d51584971cbf828a309a551da690745fbd
|
4
|
+
data.tar.gz: 04f8a2f59a6fa30308b3103b7698153795b6b46c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef4dfa2c27773687fa4bf0b27e65bc415201fe1f022fdd31631c96ab2d4cef9b8c3b16a5209f5c12d9953bc1a3cb75906083d6b0c32aa83b8a440758a0f72752
|
7
|
+
data.tar.gz: 1c0d95fee24c8ce7d1d67df9ae4bb0740e57101d0e402e3398bd4ca2aa7f120b745bba65b7d53f353c40505110bc1a3d916a79778027fd9b693295fd2e818603
|
data/CHANGELOG.md
CHANGED
data/lib/hashid/rails.rb
CHANGED
@@ -27,15 +27,11 @@ module Hashid
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def decode_id(id)
|
30
|
-
hashids.decode(id).first
|
30
|
+
hashids.decode(id.to_s).first
|
31
31
|
end
|
32
32
|
|
33
33
|
def find(hashid)
|
34
|
-
|
35
|
-
super decode_id(hashid)
|
36
|
-
else
|
37
|
-
super hashid
|
38
|
-
end
|
34
|
+
super decode_id(hashid) || hashid
|
39
35
|
end
|
40
36
|
end
|
41
37
|
end
|
data/lib/hashid/rails/version.rb
CHANGED