title: On Rails, is there a shortcut to check for boolean defined variable and use its value or use a default if not defined?
body: <p>On Ruby on Rails 3, I am trying to use the value of a boolean variable, if defined, otherwise use default value true. How should I write something like this?</p>
  
  <pre><code>if var.defined?
    var 
  else
   true
  end
  </code></pre>
  
  <p>Thanks in advance</p>