From: John Joyce Date: 2007-03-23T20:37:46+09:00 Subject: Question about if in Ruby I've seen this in Rails, but it is just ERb, so it is Ruby... <%= link_to 'Previous page', { :page => @product_pages.current.previous } if @product_pages.current.previous %> I'm curious how it is different from this... <%= if @product_pages.current.previous link_to ('Previous page', { :page => @product_pages.current.previous }) end %> I've seen this kind of if statement reversal a few times now in Ruby code. I call it do-if because it looks similar to do-while, but I am curious if reversing the condition affects the interpreter's speed at all. If they are the same, then isn't the standard if conditional better for human legibility and understanding?