Add hash to serialized column

Hey guys,

I'm trying to merge a hash with another using the .merge! function.

class User < ActiveRecord::Base
  serialize :preferences
end

This is what I end up with in the console:

u = User.find(1)
u.preferences.merge!{:test => 1}

SyntaxError: compile error
(irb):32: syntax error, unexpected tASSOC, expecting '}'
u.preferences.merge!{:test => 1}
                             ^
  from (irb):32

Any ideas?

Take care.

u.preferences.merge!({:test => 1})

Of course! Thank you very much.