title: Error when I use if inside if
body: <p>This is my  <code>show.html.erb</code>.</p>
  
  <p>I'm just trying to use an if statement within another if, when the provider is the facebook use a specific url , if the provider is google use another method.</p>
  
  <pre><code>&lt;% if current_user %&gt;
  
    &lt;%= if current_user.provider == 'google' %&gt;
      &lt;%= image_tag "#{current_user.image}?sz=100", style: "border-radius:50px" %&gt;
    &lt;% else %&gt;
      &lt;%= image_tag "https://graph.facebook.com/#{current_user.uid}/picture?width=60&amp;height=60", style: "border-radius:50px" %&gt;
    &lt;% end %&gt;
  
  &lt;%= current_user.name %&gt;
  
  &lt;% else %&gt;
    &lt;%= link_to "Logar com o Facebook", "/auth/facebook", id: "sign_in", class: "btn btn-info" %&gt;
    &lt;%= link_to "Logar com o Google", "/auth/google_oauth2", id: "sign_in" , class: "btn btn-success" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>but I'm getting this error:</p>
  
  <pre><code>Facegoogle/app/views/home/show.html.erb:5: syntax error, unexpected ')', expecting keyword_then or ';' or '\n' ...ent_user.provider == 'google' );@output_buffer.safe_append=' ... ^
  /home/filipe/Sites/Facegoogle/app/views/home/show.html.erb:9: syntax error, unexpected keyword_else, expecting ')' '.freeze; else ^ 
  /home/filipe/Sites/Facegoogle/app/views/home/show.html.erb:13: syntax error, unexpected keyword_end, expecting ')' '.freeze; end ^ 
  /home/filipe/Sites/Facegoogle/app/views/home/show.html.erb:18: syntax error, unexpected keyword_else, expecting ')' '.freeze; else ^
  /home/filipe/Sites/Facegoogle/app/views/home/show.html.erb:22: syntax error, unexpected keyword_end, expecting ')' '.freeze; end ^ 
  /home/filipe/Sites/Facegoogle/app/views/home/show.html.erb:24: syntax error, unexpected keyword_ensure, expecting ')' 
  /home/filipe/Sites/Facegoogle/app/views/home/show.html.erb:26: syntax error, unexpected keyword_end, expecting ')'
  </code></pre>