hashid-rails 0.1 → 0.1.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
  SHA1:
3
- metadata.gz: 029fdbc8655ef190bd7d51e607f5e3dd0077b9bc
4
- data.tar.gz: 07ac50d24767690e65dcfe54fd9624454f398118
3
+ metadata.gz: 7fda7fa77ee2f874aac09e9179433bee7bf05074
4
+ data.tar.gz: f1af03c1ce84bef012d2d4dd32cb22768f92dda3
5
5
  SHA512:
6
- metadata.gz: a85a411af9e395d914a3f26fa680b0e4ec25042962f4cb2588b503657bb2715707e3805d17198ac64153c95bcec6de7f55bc57366db418b719d4193fdfa44a66
7
- data.tar.gz: 6737da1ea0386fe45e910538d13324d629d72da4abef2a3e9f18e32c7a7be5bbea882b41e1d36495ba3a5a4a2b1c6342d15b40bfc8d3d999dc37b412540d7618
6
+ metadata.gz: 3b3ac34d5b43004baa62688e70ff12b7efd6f32a757aa6eb3386539cf00d800d452895523981c0b6e89df0f6f73e2649dff7cc38b5f45b4e352b7b411eb7c8e6
7
+ data.tar.gz: 12c194d33eaaaa264751a3c75b3aa35b9573a373000a8e54123f0230b57b6b1a4c402bfe1139d594632611bfc2eeb06b5883085060a7134b3f432d74124c764d
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1 (2015-04-12)
4
+
5
+ - Let `Model#find` work with integer model ids as well as hashids.
6
+
3
7
  ## 0.1.0 (2015-04-12)
4
- Initial Release
8
+
9
+ - Initial Release
data/lib/hashid/rails.rb CHANGED
@@ -31,7 +31,11 @@ module Hashid
31
31
  end
32
32
 
33
33
  def find(hashid)
34
- super(decode_id(hashid))
34
+ if hashid.is_a? String
35
+ super decode_id(hashid)
36
+ else
37
+ super hashid
38
+ end
35
39
  end
36
40
  end
37
41
  end
@@ -1,5 +1,5 @@
1
1
  module Hashid
2
2
  module Rails
3
- VERSION = '0.1'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashid-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Cypret
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-12 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler