activerecord-typedstore 0.6.0 → 0.6.1
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: 855709ac9aceae5da46732cf436026babd98f1da
|
4
|
+
data.tar.gz: 33046bf44a228c713084a6858e27dca3a9a94602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c9e26d0c8b8ce37186c2e7dcc2ed0e9757f227dec41ee55510d3363834b458c87502c6852058e1dc6f3b0fae285fd686350691ec6f32d38ed36441ed05f822
|
7
|
+
data.tar.gz: 449c5e918d80c979e4af8940c3aeea7097edb82b46c9d6ec55ae1182787e6090fc5861b770c75b85c5df0a2b915b785d274b19eb01e6139abb991d7e43f7d4ed
|
@@ -11,6 +11,9 @@ module ActiveRecord::TypedStore
|
|
11
11
|
@null = options.fetch(:null, true)
|
12
12
|
@blank = options.fetch(:blank, true)
|
13
13
|
@accessor = options.fetch(:accessor, true)
|
14
|
+
@scale = options[:scale]
|
15
|
+
@limit = options[:limit]
|
16
|
+
@precision = options[:precision]
|
14
17
|
end
|
15
18
|
|
16
19
|
def accessor?
|
@@ -74,8 +77,8 @@ module ActiveRecord::TypedStore
|
|
74
77
|
any: ::ActiveRecord::Type::Value,
|
75
78
|
}
|
76
79
|
|
77
|
-
def initialize(_, type,
|
78
|
-
@cast_type = CAST_TYPES.fetch(type).new
|
80
|
+
def initialize(_, type, options = {})
|
81
|
+
@cast_type = CAST_TYPES.fetch(type).new(options.slice(:limit, :scale, :precision))
|
79
82
|
super
|
80
83
|
end
|
81
84
|
end
|