title: Nested conditional statements in Ruby
body: <p>My issues are two-fold:</p>
  
  <ol>
  <li><p>I didn't realize I could nest multiple conditionals like this. It seems pretty nasty. I <em>think</em> I know what's going on here, but could someone who really gets it explain so I can really get the concept?</p></li>
  <li><p>Since I don't understand nested conditionals too well, I'm a bit lost on the refactor, an area I am pretty weak in to begin with. Would y'all be so kind as to present some possible refactor solutions with explanations? It would help my limited understanding greatly.</p></li>
  </ol>
  
  <hr>
  
  <pre><code>def valid_triangle?(a, b, c, sum)
    if a != 0 || b != 0 || c != 0
      if a &gt;= b
        largest = a
        sum += b
      else largest = b
        sum += a
      end
      if c &gt; largest
        sum += largest
        largest = c
      else sum += c
      end
      if sum &gt; largest
        return "true"
      else return "false"
      end
    else return false
    end
  end
  </code></pre>