converting big if statement to ember routes