arel-extensions 1.3.0 → 1.4.0

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: 8a6f63e552c7fbd2efa481ec253e867defdfd6d8
4
- data.tar.gz: 14b7814b09817ada014ef554a2aeb076f9c6bb31
3
+ metadata.gz: 93c939760cdc803cc6bbedb950ebb9ce9ca39610
4
+ data.tar.gz: ff6576c5f315d326dbd4e25a7f76d06df2159a67
5
5
  SHA512:
6
- metadata.gz: 4a8e5f1e461fc342699d8976e542028c6b1a4b1c103be746d616ded4455d174847be0e4465531ce95b27c4d29095cfa0dbced9de2c6b9f8230e3dfcf4938c685
7
- data.tar.gz: 22387749ec523e8c2cc49135925d2c50e16794ac90c5d1f4fc4405fc9eea2f76d07a0b19a79c9843b1d0bb80853d9adb4f20f78f293ceeeec19747c0f2493aad
6
+ metadata.gz: 4808b1ca2d55f753f32952883252797135193882afd328456e410db83960db3ed21342eafd9639bb15e11b7c33913bd931cbe3d60d83d3edbf71d400a2f40149
7
+ data.tar.gz: f071b4ea0c5f8887d283afed3be26be4a2e9cc361a13ea1b62fec88c051d8575b213ad5e4fc773be7618fc2ced3c510afc882700b4a4c57e9f3287d4c7dd205a
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'arel-extensions'
3
- gem.version = '1.3.0'
3
+ gem.version = '1.4.0'
4
4
 
5
5
  gem.authors = ["Jon Bracy"]
6
6
  gem.email = ["jonbracy@gmail.com"]
@@ -9,6 +9,11 @@ module Arel
9
9
  def table_name
10
10
  nil
11
11
  end
12
+
13
+ def type_cast_for_database(value)
14
+ relation.type_cast_for_database(value)
15
+ end
16
+
12
17
  end
13
18
  end
14
19
  end
@@ -23,5 +23,15 @@ module Arel
23
23
  Arel::Attributes::Cast.new(self, type)
24
24
  end
25
25
 
26
+ def dig(*keys)
27
+ keys = keys[0] if keys.size == 1 && keys.first.is_a?(Array)
28
+
29
+ if keys.empty?
30
+ self
31
+ else
32
+ keys.inject(self) { |node, key| Arel::Attributes::Key.new(node, key) }
33
+ end
34
+ end
35
+
26
36
  end
27
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-31 00:00:00.000000000 Z
11
+ date: 2017-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arel