calculated_attributes 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/calculated_attributes.rb +18 -0
- data/lib/calculated_attributes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7da323e196847b4f15e503b0d19ac25d9ecb784a
|
4
|
+
data.tar.gz: 807ad2214677049d809d2d72df5187ceffc1c6e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e730af38ee04e9bd4b68d268406d4d119e23b4d81a177a5e9ab01a425e74fbc3116a8d476e19e0dbcba03a1344abfeb65838a2962ef1c81482395fab934faadf
|
7
|
+
data.tar.gz: 7ee138eb56996b3d602c49ac7dcaabc6619974eea11d6166cb48c9f567f71c3311fa7938bf90df9f5718cc090af06241b4ae11a9439607d87ce490a61db3d202
|
@@ -187,6 +187,24 @@ module ActiveRecord
|
|
187
187
|
end
|
188
188
|
end
|
189
189
|
|
190
|
+
module ActiveRecord
|
191
|
+
module AttributeMethods
|
192
|
+
module Write
|
193
|
+
# Updates the attribute identified by <tt>attr_name</tt> with the specified +value+. Empty strings
|
194
|
+
# for fixnum and float columns are turned into +nil+.
|
195
|
+
def write_attribute(attr_name, value)
|
196
|
+
attr_name = attr_name.to_s
|
197
|
+
attr_name = self.class.primary_key if attr_name == 'id' && self.class.primary_key
|
198
|
+
@attributes_cache.delete(attr_name)
|
199
|
+
column = column_for_attribute(attr_name)
|
200
|
+
|
201
|
+
@attributes[attr_name] = type_cast_attribute_for_write(column, value)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
|
190
208
|
module Arel
|
191
209
|
module Nodes
|
192
210
|
class Node
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calculated_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Schneider
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|