I have been scraping sites and retrieving image information regarding them.
However, I need to have a http:// or http://www. or subdomain of the site to the image src if it doesn’t contain it.
Is there a quick function in rails that works on this?
You should try looking at Ruby itself and its string documentation, for example there is start_with? which checks if string starts with the input, you can use something like this:
You should be able to come up with a method to iterate over all your scraped images and update them.