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
from :0
Any ideas?
Take care.