title: Ruby on Rails regex
body: <p>I have these statements in a model:</p>
  
  <pre><code>before_save :add_http
  
  protected
  def add_http
    if (/^http\:\/\/.+$/.match(url)) == nil
      str = "http://" + url
      url = str
    end
  end
  </code></pre>
  
  <p>I have checked the regex in the console and it appears to be right, but when the 'url' gets saved to the db the "http://" has not been added.  Any ideas?</p>