changing button_to to have correct values for attributes