Fixed undefined method reject for nil:NilClass error on an undefined route.