the problem why we had to use javascript for this, is that we had to do it with a bootstrap popover and not within a whole new view. Therefore you cannot do this in rails code, as you do not know which promote button was clicked by the client.