aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/column.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/column.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/column.rb6
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: