Added id in form_for. Seems that adding paramsa to url makes it not use updated objects id. Moved end to next line in _displayform.