extract preloader usage to a new method

the preloader API in Rails has changed.  This commit extracts our usage
to a new method so that when we upgrade, we only need to change one
place.