title: Understanding the "||" OR operator in If conditionals in Ruby
body: <p>Just briefly, why are the following three lines not identical in their impact?</p>
  
  <pre><code>if @controller.controller_name == "projects" || @controller.controller_name == "parts"
  
  if @controller.controller_name == ("projects" || "parts")
  
  if @controller.controller_name == "projects" || "parts"
  </code></pre>
  
  <p>The first gives me the result I want, but as there's actually more options than just projects and parts, using that form creates a verbose statement. The other two are more compact, but don't give me the same result.</p>