activerecord-collections 0.0.10 → 0.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6e07d4f6473993e7c2b8c9aed6d5fc735de4d39
|
4
|
+
data.tar.gz: ab291ee2e1fa9beabb2ac03e30ea6cd43ecdbbd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b27eaf11f36645b7a1c30279c46f16ac92135a7c38fd19a788d9a0ed072f17aa840f49d732223e1b38ac5c6abd71c90eec240a82e3e73454f2058e9ce9d5daff
|
7
|
+
data.tar.gz: 9dca6c8e1b4b32480bb7b51b7506c686852d22a2bf456a97e395df397da8a20f717bb9f389cdfb8ee4bfbab0b526c448357c5e42429d8ac09e2800f42098614d
|
@@ -11,8 +11,8 @@ module ActiveRecord
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def from_hash(hash)
|
14
|
-
hash.symbolize_keys!
|
15
|
-
collection = new(hash[:klass])
|
14
|
+
hash.symbolize_keys! unless hash.is_a?(HashWithIndifferentAccess)
|
15
|
+
collection = hash.has_key?(:klass) ? new(hash[:klass]) : new
|
16
16
|
collection.select!(*hash[:select]) unless hash[:select].empty?
|
17
17
|
collection.distinct! if hash[:distinct] == true
|
18
18
|
collection.joins!(*hash[:joins]) unless hash[:joins].empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-collections
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|