From be1bef69bf733b875695e1523ccfceefb7565c12 Mon Sep 17 00:00:00 2001 From: Leonard van Driel Date: Fri, 1 Nov 2013 10:29:09 +0100 Subject: [PATCH] Fix incorrect extraneous quoting (issues #34 and #37) --- lib/activerecord-postgres-array/activerecord.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/activerecord-postgres-array/activerecord.rb b/lib/activerecord-postgres-array/activerecord.rb index 1d18afb..dd8be3b 100644 --- a/lib/activerecord-postgres-array/activerecord.rb +++ b/lib/activerecord-postgres-array/activerecord.rb @@ -15,7 +15,7 @@ def arel_attributes_values(include_primary_key = true, include_readonly_attribut if include_readonly_attributes || !self.class.readonly_attributes.include?(name) value = read_attribute(name) if column.type.to_s =~ /_array$/ && value && value.is_a?(Array) - value = "'#{value.to_postgres_array(new_record?)}'" + value = value.to_postgres_array(new_record?) elsif klass.serialized_attributes.include?(name) value = @attributes[name].serialized_value end