title: SyntaxError in Posts#index?
body: <p>I get this particular error: 
  C:/Sites/rails_projects/blog/app/views/posts/index.html.erb:26: syntax error, unexpected keyword_ensure, expecting keyword_end
  C:/Sites/rails_projects/blog/app/views/posts/index.html.erb:28: syntax error, unexpected $end, expecting keyword_end</p>
  
  <p>Right here is the full index view</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;/head&gt;
  
  &lt;%= will_paginate %&gt;
  &lt;% @posts.each do |post| %&gt;
    &lt;div class="container", "relative"&gt;
      &lt;div class="row-fluid"&gt;
        &lt;h1&gt;&lt;%= post.Title %&gt;&lt;/h1&gt;
          &lt;p&gt;&lt;%= post.Post %&gt;&lt;/p&gt;
          &lt;% if is_admin? %&gt;
          &lt;p&gt;&lt;%= link_to 'Show', post %&gt;&lt;/p&gt;
          &lt;p&gt;&lt;%= link_to 'Edit', edit_post_path(post) %&gt;&lt;/p&gt;
          &lt;p&gt;&lt;%= link_to 'Destroy', post_path(post),
          method: :delete, data: { confirm: 'Are you sure?'} %&gt;&lt;/p&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;% end %&gt;
    &lt;%= will_paginate %&gt;
  &lt;% if is_admin? %&gt;
  &lt;%= link_to 'New Post', new_post_path %&gt;
  &lt;% else %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I think the reason is the is_admin?</p>
  
  <p>So here is my sessions_helper.</p>
  
  <pre><code>def sign_in(user)
      cookies.permanent[:remember_token] = user.remember_token
      current_user = user
    end
  
    def signed_in?
      !current_user.nil?
    end
  
    def current_user=(user)
      @current_user = user
    end
  
    def current_user
      @current_user ||= User.find_by_remember_token(cookies[:remember_token])
    end
  
    def current_user?(user)
      user == current_user
    end
  
  
    def is_admin?
      signed_in? ? current_user.admin : false
    end
  
    def sign_out
      current_user = nil
      cookies.delete(:remember_token)
    end
  </code></pre>
  
  <p>I'm not exactly sure where the error is?</p>