title: Newbie: ternary "if" condition syntax on VIEW
body: <p>I would like to have the if condition logic like:</p>
  
  <pre><code>var == 10 ? “10″ : “Not 10″
  </code></pre>
  
  <p>on Rails VIEW. What I tried is following:</p>
  
  <pre><code>&lt;%= session[:id]=="out"? link_to "Sign in", login_path : link_to "Sign out", logout_path%&gt;
  </code></pre>
  
  <p>I know it looks odd, and unsurprisingly it does not work. So, if I would like to use ternary if condition on VIEW, what is the correct way to do in my case? </p>
  
  <p><strong>---------One more condition---------</strong></p>
  
  <p>I would like to have <strong>two</strong> "link_to" in <strong>else</strong> condition</p>
  
  <p>-----The error message I got--------</p>
  
  <pre><code>compile error
  
  syntax error, unexpected tSTRING_BEG, expecting kDO or '{' or '('
  ...ession[:id]=="out" ? link_to "Sign in",
  </code></pre>