activerecord-collections 0.0.16 → 0.0.17

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: 0e37fb171d8cc289bfa86dd8bc1f97c8aaaf5668
4
- data.tar.gz: a8add4d9699bc7a50a0f1fcc326340056a1fcf58
3
+ metadata.gz: 4de62cf60138ca3906e0671151490ffd7e1eb282
4
+ data.tar.gz: dace6966f02c9c32068c1dcb5e628a892540a64a
5
5
  SHA512:
6
- metadata.gz: 3dc0e8793722acd3bbc725260756d497f6d61bda86b4f7445dcb23f6dfc17cefbe04bf197196c0c50049ffd64e0ae8ea18d2fb1fc8591b33eac7770172f6b6a1
7
- data.tar.gz: 26278e1ad1004c63ff1212b13c02a82c9fcb9fb8319aa824fb0fd6bec997cecd6fcc299a3c2a97cd23f40eb4f9514ac2cfb7e266cffd7b90aa384d4f471cb3bd
6
+ metadata.gz: 605155e1db7fd95407bd3ce399826a5898c6de494f985c4b91c5f5cbaf45a8f4aef52fe3c07b3f809a84d8afa7951151d2e905a4a06dc69b853a30122e8a0d75
7
+ data.tar.gz: a4ea7544eec471ed010f919907f38331a64616854745e2f00bec39f2fad3d9b71a8e86a5b0003065a6a0298eb9e02973cbfba57538302df76ce9c4ed25225e52
@@ -130,6 +130,11 @@ module ActiveRecord
130
130
  bound = bind.delete_at(bind.find_index { |b| b[:name] == node.left.name.to_s })[:value]
131
131
  elsif node.right.is_a?(Arel::Nodes::Casted)
132
132
  bound = node.right.val
133
+ elsif node.right.is_a?(Array)
134
+ bound = node.right.map do |n|
135
+ raise "ActiveRecord::Collection does not know how to serialize this attribute: #{node.left.name} / #{n.class.name}" unless n.is_a?(Arel::Nodes::Casted)
136
+ n.val
137
+ end
133
138
  else
134
139
  raise "ActiveRecord::Collection does not know how to serialize this attribute: #{node.left.name} / #{node.right.class.name}"
135
140
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Collections
3
- VERSION = '0.0.16'
3
+ VERSION = '0.0.17'
4
4
  end
5
5
  end
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.16
4
+ version: 0.0.17
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-23 00:00:00.000000000 Z
11
+ date: 2015-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord