aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/value.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/type/value.rb')
-rw-r--r--activerecord/lib/active_record/type/value.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/type/value.rb b/activerecord/lib/active_record/type/value.rb
index 475e130013..9456a4a56c 100644
--- a/activerecord/lib/active_record/type/value.rb
+++ b/activerecord/lib/active_record/type/value.rb
@@ -76,6 +76,13 @@ module ActiveRecord
false
end
+ def ==(other)
+ self.class == other.class &&
+ precision == other.precision &&
+ scale == other.scale &&
+ limit == other.limit
+ end
+
private
def type_cast(value)