diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-22 15:47:46 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-22 15:47:46 -0300 |
commit | 3b814ed2b52305797451149dbb629b601a18165f (patch) | |
tree | 5bbcf2fab4697ad63d90ab65a3a7efa19b1a31dd /activerecord/lib/active_record/connection_adapters/column.rb | |
parent | 35c160066aea1f0ded952da0f3f9e78b61c38507 (diff) | |
parent | 55400052186c3b3cb15c86f38ee266e5dafed696 (diff) | |
download | rails-3b814ed2b52305797451149dbb629b601a18165f.tar.gz rails-3b814ed2b52305797451149dbb629b601a18165f.tar.bz2 rails-3b814ed2b52305797451149dbb629b601a18165f.zip |
Merge pull request #15239 from croaky/dc-sg-move-extract-precision-to-types
Move `extract_precision` onto type objects
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/column.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/column.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/column.rb b/activerecord/lib/active_record/connection_adapters/column.rb index a718756b93..522fa57822 100644 --- a/activerecord/lib/active_record/connection_adapters/column.rb +++ b/activerecord/lib/active_record/connection_adapters/column.rb @@ -69,15 +69,11 @@ module ActiveRecord end private - delegate :extract_scale, to: :cast_type + delegate :extract_scale, :extract_precision, to: :cast_type def extract_limit(sql_type) $1.to_i if sql_type =~ /\((.*)\)/ end - - def extract_precision(sql_type) - $2.to_i if sql_type =~ /^(numeric|decimal|number)\((\d+)(,\d+)?\)/i - end end end # :startdoc: |