relaxo-model 0.10.0 → 0.10.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: b1ae3a29f77dae4356693e9b75175407e1c6d867
4
- data.tar.gz: 432e8decdccadbfeacb067439e918256183b6f68
3
+ metadata.gz: 2e7313b62b4fd9bedf5adcfacc4de7280accdc86
4
+ data.tar.gz: be98e23563623fa14974e665cfb6460253151f49
5
5
  SHA512:
6
- metadata.gz: 204332daa91dcf3887f22fe3d2e0e597616a6d944af12c44887812245188f2315b540dae775d9f1f044999a3b1a2c7c33d7f215a9e9f3ad85262db738bbe3cb8
7
- data.tar.gz: b76b115b30e5b612b5ef974660e51463fca035a235e88fca2462371b80b4097f740e10ab103d9f813ddc5b69221e2a2f7553287a00bedf9bef39dc9632c5047a
6
+ metadata.gz: d49a0f9965efb150ed2dcf453ba4b1002943642dda0715f38269e5fb53a733e1507ac43734de58a665aea14a3cbf4c321b69d56d79c05c512840ccb5e6e7defc
7
+ data.tar.gz: 25d6b1195bf4b2e2bb85bef1d1e2f03f9911787874c71ac749300711f6f81cf1d43fc5597142aefa4551ebeaabfbd17a9a8b94ff736cb2522ee4d2684f376506
@@ -217,11 +217,19 @@ module Relaxo
217
217
  def after_create
218
218
  end
219
219
 
220
- # Equality is done only on id
220
+ # Equality is done only on id to improve performance.
221
221
  def <=> other
222
222
  self.id <=> other.id if other
223
223
  end
224
224
 
225
+ def eql? other
226
+ self.id.eql?(other.id) if other
227
+ end
228
+
229
+ def hash
230
+ self.id.hash
231
+ end
232
+
225
233
  def empty?
226
234
  @attributes.empty?
227
235
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Relaxo
22
22
  module Model
23
- VERSION = "0.10.0"
23
+ VERSION = "0.10.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaxo-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-04 00:00:00.000000000 Z
11
+ date: 2018-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: relaxo