refactoring on the available actions and to link_to