diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-05-20 16:39:25 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-05-20 16:39:25 +0200 |
commit | d17b05657153f4305e4112532c485239d49b77b8 (patch) | |
tree | 89890683aa8ec5f81298415b60cc890c958b2da2 /activerecord/lib/active_record/connection_adapters/type/decimal.rb | |
parent | f9860fcbe2973025df6ccf4bba0431492af09575 (diff) | |
parent | 36fde2b704164ac02380518350f01a17d3e0208e (diff) | |
download | rails-d17b05657153f4305e4112532c485239d49b77b8.tar.gz rails-d17b05657153f4305e4112532c485239d49b77b8.tar.bz2 rails-d17b05657153f4305e4112532c485239d49b77b8.zip |
Merge pull request #15197 from sgrif/sg-delegate-type-cast-sqlite3
Delegate `#type_cast` to injected type objects on SQLite3
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/type/decimal.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/type/decimal.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/type/decimal.rb b/activerecord/lib/active_record/connection_adapters/type/decimal.rb index 5b39ea9e2f..9581cd5964 100644 --- a/activerecord/lib/active_record/connection_adapters/type/decimal.rb +++ b/activerecord/lib/active_record/connection_adapters/type/decimal.rb @@ -5,6 +5,12 @@ module ActiveRecord def type :decimal end + + private + + def cast_value(value) + Column.value_to_decimal(value) + end end end end |