Fixed bug introduced with refactor. Passed in the action to generate different urls per button action.