made public_url method public to render views