application_helper is more suitable place to define this method.