Konrad Meyer wrote: > Quoth Joshua Muheim: >> >> Thanks >> Josh > > irb(main):001:0> str = "" > => "" > irb(main):002:0> str != "" || "asdf" > => "asdf" > irb(main):003:0> nil || "asdf" > => "asdf" > > HTH, The problem is, in my Rails app I sometimes have a variable set to "" (empty user input) or nil. <%= "The variable is #{(var || "empty")}" %> With your version I won't get "empty" when the var is nil: <%= "The variable is #{(var != "" || "empty")}" %> var = nil => The variable is # nothing here... var = "asdf" => The variable is asdf -- Posted via http://www.ruby-forum.com/.