This ("if @contest.name") is for /admin/contests/new. In /admin/contests/new, @contest is actually not created in the database, so you can't get admin_contest_problems_path(@contest).