refactor controller helper methods
refactor edit_path helper