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: 47596eed47c824d972d720e7a92824c3dfc78be2
4
- data.tar.gz: ad7d7ae821c585f6eb14433f2f632652ba26800d
3
+ metadata.gz: 855709ac9aceae5da46732cf436026babd98f1da
4
+ data.tar.gz: 33046bf44a228c713084a6858e27dca3a9a94602
5
5
  SHA512:
6
- metadata.gz: 776c9702342b18f7660cadf2feb2ca95b8c14bf4e7746c68551d3ec22ee36a468718d3ad4fd83a880fa32d997f767588e179ffadf4bd460f0e3ee504d7e49033
7
- data.tar.gz: 0107e22b515e042c74a535d0e1f1650d31de11f70ca55b4994554eed435f43c8f06f84ec039125b069b62ce414407b1dd3ffce5f5e078bbca9ff3bd9362d0977
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
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module TypedStore
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-typedstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier