Something like this https://github.com/JoelQ/forum/blob/2d2e75ce1ba2aac1db5bbbb5a7ea3ae44dc267c7/app/helpers/application_helper.rb