Updated update statement to be Rails 4 compatible