title: ActionView::SyntaxErrorInTemplate in DiscussionsController#show
body: <p>I'm learning Ruby on Rails and I'm stuck with this problem. I've looked at the other similar problems but did not find a solution that worked for me.
  So its a discussion platform but any time i click to view a discussion i get an error: </p>
  
  <blockquote>
    <p>Encountered a syntax error while rendering template: check</p>
  </blockquote>
  
  <pre><code>&lt;div class="columns"&gt; 
  &lt;div class="column is-8"&gt; 
  &lt;h1 class="title is-2 has-text-grey discussion-title"&gt;&lt;%= @discussion.title %&gt;&lt;/h1&gt; &lt;h3 class="subtitle is-5 has-text-grey-lighter"&gt;by &lt;%= @discussion.user.username %&gt; in &lt;%= link_to @discussion.channel.channel, @discussion.channel %&gt;&lt;/h3&gt; &lt;div class="level"&gt; &lt;div class="level-left"&gt;&lt;/div&gt; &lt;div class="level-right"&gt; &lt;% if discussion_author(@discussion) %&gt; &lt;div class="buttons"&gt; &lt;%= link_to 'Edit Discussion', edit_discussion_path(@discussion), class:'button'%&gt; &lt;%= link_to 'Delete', discussion_path(@discussion), method: :delete, data: { confirm: "Delete discussion?" }, class:'button' %&gt; &lt;/div&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="content"&gt;&lt;%= markdown(@discussion.content) %&gt;&lt;/div&gt; &lt;h2 class="subtitle is-5 has-text-grey"&gt;&lt;%= @discussion.replies.count %&gt; Replies&lt;/h2&gt; &lt;div id="discussion-replies"&gt; &lt;%=# render @discussion.replies %&gt; &lt;/div&gt; &lt;hr/&gt; &lt;h3 class="subtitle is-3 has-text-grey"&gt;Leave a reply&lt;/h3&gt; &lt;% if user_signed_in? %&gt; &lt;%=# render 'replies/form' %&gt; &lt;% else %&gt; &lt;p&gt;To reply you need to &lt;%= link_to 'login', new_user_session_path %&gt;. Don't have an account? &lt;%= link_to 'Sign up', new_user_registration_path %&gt; for one.&lt;/p&gt; &lt;% end %&gt; &lt;/div&gt; &lt;%= render 'sidebar' %&gt; &lt;/div&gt;
  
   &lt;div class="columns"&gt;
    &lt;div class="column is-8"&gt;
      &lt;h1 class="title is-2 has-text-grey discussion-title"&gt;&lt;%= @discussion.title %&gt;&lt;/h1&gt;
      &lt;h3 class="subtitle is-5 has-text-grey-lighter"&gt;by &lt;%= @discussion.user.username %&gt; in &lt;%= link_to @discussion.channel.channel, @discussion.channel %&gt;&lt;/h3&gt;
      &lt;div class="level"&gt;
        &lt;div class="level-left"&gt;&lt;/div&gt;
        &lt;div class="level-right"&gt;
          &lt;% if discussion_author(@discussion) %&gt;
          &lt;div class="buttons"&gt;
              &lt;%= link_to 'Edit Discussion', edit_discussion_path(@discussion), class:'button'%&gt;
              &lt;%= link_to 'Delete', discussion_path(@discussion), method: :delete, data: { confirm: "Delete discussion?" }, class:'button' %&gt;
          &lt;/div&gt;
          &lt;% end %&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="content"&gt;&lt;%= markdown(@discussion.content) %&gt;&lt;/div&gt;
  
      &lt;h2 class="subtitle is-5 has-text-grey"&gt;&lt;%= @discussion.replies.count %&gt; Replies&lt;/h2&gt;
  
      &lt;div id="discussion-replies"&gt;
        &lt;%= render @discussion.replies %&gt;
      &lt;/div&gt;
  
      &lt;hr /&gt;
  
      &lt;h3 class="subtitle is-3 has-text-grey"&gt;Leave a reply&lt;/h3&gt;()
      &lt;% if user_signed_in? %&gt;
        &lt;%= render 'replies/form' %&gt;
      &lt;% else %&gt;
      &lt;p&gt;To reply you need to &lt;%= link_to 'login', new_user_session_path %&gt;. Don't have an account?
        &lt;%= link_to 'Sign up', new_user_registration_path %&gt; for one.&lt;/p&gt;
      &lt;% end %&gt;
  
    &lt;/div&gt;
  
    &lt;%= render 'sidebar' %&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>Extracted source (around line #22): </p>
  
  <p>expecting to move to show page when a post is selected</p>