In my application I have websites being saved to a field called website that you can put the value of www.website.com or use http://www.website.com. I’m not sure how you make the http://www.website.com always look like www.website.com in the view.
If my model is Store and its table column is t.string :website. What would I put in my StoreHelper and view? Is it possible to change a string like this?
You can use regex to get rid of the
http://part:Personally, I wouldn’t do it in a helper, but add a method to my model:
With this you can do: