Use URL's to_asset method instead of to, so you don't get your applications index in the resources urls