diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-02-28 18:19:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 18:19:33 -0500 |
commit | 77d3550f60a82bc316572026506df4123391d4b5 (patch) | |
tree | 786e633b1a900301a24133ed3eb72e8f5dc9a8d2 /activerecord/lib | |
parent | 4b4d3f70eb372db6dca60b8a354f4b2cd179055d (diff) | |
parent | b01740f9088be49b49f7ed0ca7b73ebbde87bd97 (diff) | |
download | rails-77d3550f60a82bc316572026506df4123391d4b5.tar.gz rails-77d3550f60a82bc316572026506df4123391d4b5.tar.bz2 rails-77d3550f60a82bc316572026506df4123391d4b5.zip |
Merge pull request #25296 from kamipo/use_inspect_for_type_cast_for_schema
Use `inspect` in `type_cast_for_schema` for date/time and decimal values
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/type/decimal_without_scale.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/type/decimal_without_scale.rb b/activerecord/lib/active_record/type/decimal_without_scale.rb index 7ce33e9cd3..53a5e205da 100644 --- a/activerecord/lib/active_record/type/decimal_without_scale.rb +++ b/activerecord/lib/active_record/type/decimal_without_scale.rb @@ -4,6 +4,10 @@ module ActiveRecord def type :decimal end + + def type_cast_for_schema(value) + value.to_s.inspect + end end end end |