title: ruby - using include method in a case statement
body: <p>I'm using something like this:</p>
  
  <pre><code>case referer
        when (referer.include? "some_string")
          redirect_link = edit_product_path
        when (referer.include? "some_other_string")
          redirect_link = other_product_path
  end
  </code></pre>
  
  <p>Unfortunately, this returns nil even if the string <code>some_string</code> is present in the variable <code>referer</code>.</p>
  
  <p>Here's what i tried in Ruby Console:</p>
  
  <pre><code>ruby-1.8.7-p334 :006 &gt; jasdeep = "RAILS"
  ruby-1.8.7-p334 :026 &gt; case jasdeep
  ruby-1.8.7-p334 :027?&gt;   when (jasdeep.include? "AI")
  ruby-1.8.7-p334 :028?&gt;   puts "Hello"
  ruby-1.8.7-p334 :029?&gt; end
  =&gt; nil
  </code></pre>
  
  <p>Any inputs will be appreciated.</p>