From 143fbbddbbce84f44434c58828e2a537553e69ea Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Sat, 13 Sep 2008 12:54:45 +0200 Subject: Clarify decimal precision and scale options. --- .../connection_adapters/abstract/schema_definitions.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index b764f26ec8..bcb975e8e1 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -341,6 +341,12 @@ module ActiveRecord # * :scale - # Specifies the scale for a :decimal column. # + # For clarity's sake: the precision is the number of significant digits, + # while the scale is the number of digits that can be stored following + # the decimal point. For example, the number 123.45 has a precision of 5 + # and a scale of 2. A decimal with a precision of 5 and a scale of 2 can + # range from -999.99 to 999.99. + # # Please be aware of different RDBMS implementations behavior with # :decimal columns: # * The SQL standard says the default scale should be 0, :scale <= -- cgit v1.2.3