aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-07-03 07:40:14 -0600
committerSean Griffin <sean@thoughtbot.com>2014-07-03 13:12:41 -0600
commitefc436df2092bacc896dbf66ddc332aeafe42e72 (patch)
treec8942f2c160cdf7c2966da4fd5789b46a56b8e66 /activerecord/lib/active_record/type
parent03c9c0e2fa83e4ccaefb3b06970b9c3efe170be5 (diff)
downloadrails-efc436df2092bacc896dbf66ddc332aeafe42e72.tar.gz
rails-efc436df2092bacc896dbf66ddc332aeafe42e72.tar.bz2
rails-efc436df2092bacc896dbf66ddc332aeafe42e72.zip
Remove unneccessary special case for money in quoting
Diffstat (limited to 'activerecord/lib/active_record/type')
-rw-r--r--activerecord/lib/active_record/type/string.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/type/string.rb b/activerecord/lib/active_record/type/string.rb
index 14b03dcb2d..8cc533bc41 100644
--- a/activerecord/lib/active_record/type/string.rb
+++ b/activerecord/lib/active_record/type/string.rb
@@ -16,10 +16,10 @@ module ActiveRecord
end
def type_cast_for_database(value)
- if value.is_a?(::String)
- ::String.new(value)
- else
- super
+ case value
+ when ::Numeric then value.to_s
+ when ::String then ::String.new(value)
+ else super
end
end