Actually both forms are correct. の is a recent development in Japanese, before it appeared, you'd use the 連体形(行く/熱い/綺麗な[る]/食べた[る]) directly before particles. An example can be seen here:

> 今宵は夜毎にこゝに集ひ來る骨牌(かるた)仲間も「ホテル」に宿りて、舟に殘れる***は***余一人のみなれば。

> 森鴎外 「舞姫」

Your should still use の, though.