Rails' serialize, on steroids