hashid-rails 1.1.0 → 1.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: cf52f7660d6373fa40779618384e0ed119723ddb
4
- data.tar.gz: 46ab38a8734c1c09a826bc39984bf8201c87a207
3
+ metadata.gz: 66d9ab4bf57ba4701a2c7b6b3623918acf8d6d5b
4
+ data.tar.gz: 9c3d4ddb80707ba6d37527fb42866a5d207476a4
5
5
  SHA512:
6
- metadata.gz: 97335ce4d3e274f3dc57d70ecd08f70b851fb5a204051e6d63475b5125f0c045e701761db765b88e627e180eca74336dd013e9dc57afdcbbcd79befc69dce8c7
7
- data.tar.gz: d58c2692ca18d302997a6ba1cb690187de52421cff9bbdfbb36687076b2ec8c9be3bc36498789a62bc963bb4a3c01735b06f08fc2672385f6dc797fe11e100ba
6
+ metadata.gz: 890565c0d8146c4cd14767b6532c00173e94f2d0d88945575a763ad657c68c01cca430740849914321024f46978006f49e1f4c3818b270dfdfabe6477cf0de63
7
+ data.tar.gz: 462f649bb6208099c1aa5901d6868fb2ee94841121864f1c4d5a29059b8dc3abdf230804d9deb052469071345c29e7fc9959a7975afc2cbcda2a516c1856d227
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.1 (2017-11-03)
4
+ - Fix eager loading and finding records through a parent. ([#39](https://github.com/jcypret/hashid-rails/pull/39))
5
+
3
6
  ## 1.1.0 (2017-10-04)
4
7
  - Add option to disable hashid signing. This adds backwards compatibility with
5
8
  pre-1.0 releases. Thanks [@olliebennett](https://github.com/olliebennett)! ([#37](https://github.com/jcypret/hashid-rails/pull/37))
@@ -34,6 +34,16 @@ module Hashid
34
34
  alias to_param hashid
35
35
 
36
36
  module ClassMethods
37
+ def relation
38
+ super.tap { |r| r.extend ClassMethods }
39
+ end
40
+
41
+ def has_many(*args, &block) # rubocop:disable Style/PredicateName
42
+ options = args.extract_options!
43
+ options[:extend] = Array(options[:extend]).push(ClassMethods)
44
+ super(*args, options, &block)
45
+ end
46
+
37
47
  def encode_id(ids)
38
48
  if ids.is_a?(Array)
39
49
  ids.map { |id| hashid_encode(id) }
@@ -1,5 +1,5 @@
1
1
  module Hashid
2
2
  module Rails
3
- VERSION = "1.1.0".freeze
3
+ VERSION = "1.1.1".freeze
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: 1.1.0
4
+ version: 1.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: 2017-10-05 00:00:00.000000000 Z
11
+ date: 2017-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler