update rails for db relationship