refactor items controller to use update_attributes