ar-ondemand 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/ar-ondemand/fast_enumeration.rb +3 -2
- data/lib/ar-ondemand/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmJkZGE0ZjJmOTAxNGMzNTQ2M2VhZWIxODJkZmYxODE5OTc1ZjQyMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjgxOGJjYWVjMzVhY2U2ZjYzZTk4OWZmMTI1MThmZThkYTA1ZTYxNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDNjOTY4Y2MyN2JlYzRjZGU2YzFhNjEyNmY0YmQzZWE5YTAzYWU2Y2NmNjlm
|
10
|
+
MWM1N2U2MmFmYWU1ZDZiYTAzMzg0NmM5MThjYTNkMjEyMGU3NjAyYWQzZWMy
|
11
|
+
ODMzNGVmNTE2ZThjMjk4YTI2ZmE0NTcwZjNkMTAzNjdiYzkyMDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWU1ZTlkYzYyZGM0ZGY1ZDgxYTUyMGRkZWVmMTg1ODk1M2YwZGNhNjdiYzVh
|
14
|
+
NWQyMzVlOTQwNTJhNGU4ZjViNDgzMWJjYmFhNGVjMmYzMGIxYTM2MGY1NDE2
|
15
|
+
OWY3ZDMwYzNjZjQ0ZTI0OWRkYTEyZWJlYmM5MzU1ZDdkZDlmMGU=
|
data/Gemfile.lock
CHANGED
@@ -4,11 +4,12 @@ module ActiveRecord
|
|
4
4
|
|
5
5
|
def initialize(model, result_set)
|
6
6
|
@result_set = result_set
|
7
|
-
|
7
|
+
@column_models = model.columns.inject({}) {|h,c| h[c.name] = c; h}
|
8
8
|
result_set.columns.each_with_index do |name, index|
|
9
|
+
column_model = @column_models[name]
|
9
10
|
self.define_singleton_method(name) {
|
10
11
|
raise "Not accessible outside of enumeration" if @row.nil?
|
11
|
-
@row[index]
|
12
|
+
column_model.type_cast @row[index]
|
12
13
|
}
|
13
14
|
end
|
14
15
|
end
|
data/lib/ar-ondemand/version.rb
CHANGED