From dabf90624932ef49214383b0e0bd7d3b80fbc39f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 20 Mar 2005 14:25:26 +0000 Subject: Added type conversion before saving a record, so string-based values like "10.0" arent left for the database to convert #820 [dave@cherryville.org] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@928 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index f85cad1f98..a60741fc21 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1241,7 +1241,7 @@ module ActiveRecord #:nodoc: def attributes_with_quotes(include_primary_key = true) columns_hash = self.class.columns_hash - attrs_quoted = @attributes.inject({}) do |attrs_quoted, pair| + attrs_quoted = attributes.inject({}) do |attrs_quoted, pair| attrs_quoted[pair.first] = quote(pair.last, columns_hash[pair.first]) unless !include_primary_key && pair.first == self.class.primary_key attrs_quoted end -- cgit v1.2.3