Adds upsertion to ActiveRecord