active_hash 1.5.1 → 1.5.2

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: 10ab92fe5ae0453d087ce9f904ade8c1664db5c3
4
- data.tar.gz: '0964a0f76b8d9321f0c7bcbe136e2dde6a91ed2f'
3
+ metadata.gz: c8acc3676775043861b3c4c658566c9517381793
4
+ data.tar.gz: 998aeda1de90bcd1a6a08c4ae3c3895336adab98
5
5
  SHA512:
6
- metadata.gz: c00058af1e0cc646f6f7e6b3e2b9a3f06e129c1297cd8d59dff7a9b7aff411beb91237bd4999976f8adfecce2244e85da9131332edee3b11eba665402380e40a
7
- data.tar.gz: b41cd527f634cb8f57eea675ef2a732e97c808b9409086191b0b28391340d650d980d6b94aded02041856668c8dc5b9f2ae25d72f9b56c32720af599da9e0be0
6
+ metadata.gz: 409dc56e3320ff815b2349c3fcf0e68fd83b7db7ed632c3a14a97f05342eb95f4763d02b79c0b9bd59a6d5a6186d26428ab9aa39bf0de145a19df16a26e4c3fe
7
+ data.tar.gz: 2089dee0d560192d62ab2aa583a3526b1920c716c4da960a2c5152d6fb19672a1cb033d361892d31093d323cb1610c66df3b86d440f9bc56defa49578e2e8add
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 2017-06-14 (v1.5.2)
2
+ - Fix find_by when passed an invalid id [#152](https://github.com/zilkey/active_hash/pull/152) Thanks, @davidstosik
3
+
1
4
  2017-04-20 (v1.5.1)
2
5
  - Fix a bug on `.where` [#147](https://github.com/zilkey/active_hash/pull/147)
3
6
 
@@ -35,7 +35,7 @@ module ActiveHash
35
35
  if Object.const_defined?(:ActiveModel)
36
36
  model_name.cache_key
37
37
  else
38
- ActiveSupport::Inflector.tableize(self).downcase
38
+ ActiveSupport::Inflector.tableize(self.name).downcase
39
39
  end
40
40
  end
41
41
 
@@ -160,7 +160,7 @@ module ActiveHash
160
160
  # use index if searching by id
161
161
  if options.key?(:id) || options.key?("id")
162
162
  ids = (options.delete(:id) || options.delete("id"))
163
- candidates = Array.wrap(ids).map { |id| find_by_id(id) }
163
+ candidates = Array.wrap(ids).map { |id| find_by_id(id) }.compact
164
164
  end
165
165
  return candidates if options.blank?
166
166
 
@@ -1,5 +1,5 @@
1
1
  module ActiveHash
2
2
  module Gem
3
- VERSION = "1.5.1"
3
+ VERSION = "1.5.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dean
@@ -29,7 +29,7 @@ authors:
29
29
  autorequire:
30
30
  bindir: bin
31
31
  cert_chain: []
32
- date: 2017-04-20 00:00:00.000000000 Z
32
+ date: 2017-06-14 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
@@ -87,9 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.5.2
90
+ rubygems_version: 2.6.11
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: An ActiveRecord-like model that uses a hash or file as a datasource
94
94
  test_files: []
95
- has_rdoc: