app/models/content.rb
def sanitize_image_url
    if self.image_url 
      if self.image_url.first != "h"
        self.image_url = "http://#{self.image_url}"
      end
    end
  end
# Sanitize image urls that dont have http preceeding
# Images folder gets prepended if there is no http 
# i.e. 'images/cdn.caredox.com/assets/caredoxshare.svg'
Sanitize image urls that dont have http preceeding
Images folder gets prepended if there is no http
i.e.
Sanitize image urls that dont have http preceeding Images folder gets prepended if there is no http i . e .
def sanitize_image_url
    if self.image_url 
      if self.image_url.first != "h"
        self.image_url = "http://#{self.image_url}"
      end
    end
  end
def sanitize_image_url if self . image_url if self . image_url . first != "h" self . image_url = "http://#{self.image_url}" end end end
Sanitize image urls that dont have http preceeding
Images folder gets prepended if there is no http
i.e.
Sanitize image urls that dont have http preceeding Images folder gets prepended if there is no http i . e .