I keep on receiving this error:
Showing app/views/posts/index.html.haml where line #115 raised:
app/views/posts/index.html.haml:115: syntax error, unexpected keyword_ensure,
expecting $end
Extracted source (around line #115):
0
Trace of template inclusion: app/views/posts/index.html.haml
Application Trace | Framework Trace | Full Trace
app/controllers/posts_controller.rb:28:in `index'
This is the index.html.haml file:
.container-fluid
%br
.row-fluid
.span3
.well.sidebar-nav{:style=>'background-color:rgb(999,999,999);'}
%ul.nav.nav-pills.nav-stacked
%li
%a{:href => '#'} Todays Best
%li
%a{:href => '#'} Yesterdays Best
%li
%a{:href => '#'} Weeks Best
%li
%a{:href => '#'} Months Best
%li
%a{:href => '#'} Hall of Fame
.label.label-inverse
%center
Todays Best:
%table.table.table-bordered.table-condensed{:style=>'background-color:rgb(999,999,999);'}
- @count= 0
- @feedcount= 4 #5 best
- @popularfeed.each do |post|
- if @count<=@feedcount then
%tr
%td
%center
= truncate(post.content, :length => 132)
- @count= @count +1
%br
%p{:align => "right"}
%span{:style=>'color:green;'}=post.likes
%span{:style=>'color:red;'}=post.dislikes
%span{:style=>'color:blue;'}=post.prominence
.span6
%center
%table.table.table-bordered.table-condensed{:style=>'background-color:rgb(999,999,999);'}
- @mainfeed.each do |post|
=link_to post do
%tr
%td
%center
%br
=post.content
%p.small{:align => 'right'}
3 days ago
%center
%span.labelStyle.label.label-success
=link_to 'Agree', :action => 'like', :id => post.id
=post.likes
%span.label.label-important.postbar
=link_to 'Disagree', :action => 'dislike', :id => post.id
=post.dislikes
%span.label.label-info.postbar
=link_to 'Voice', :action => 'prominence', :id => post.id
=post.prominence
%span.label.postbar
%a{:'data-toggle'=>"modal", :'data-target'=>"#myModal"}
Comments
=post.comments.count
%span.label.postbar
Report
%br
%br
%tr
%td
%p
%a.btn{:href => '#'} View details »
.span3
.well{:style=>'background-color:rgb(999,999,999);'}
=render 'form'
-# .alert.alert-success
-# Post was succesfully made.
.span3
.label.label-inverse
%center Most Controversial:
%table.table.table-bordered.table-condensed{:style=>'background-color:rgb(999,999,999);'}
- @count= 0
- @feedcount= 3 #3 best
- @controfeed.each do |post|
- if @count<=@feedcount then
%tr
%td
%center
=truncate(post.content, :length => 132)
-@count= @count +1
%br
%p{:align => "right"}
%span{:style=>'color:green;'}=post.likes
%span{:style=>'color:red;'}=post.dislikes
%span{:style=>'color:blue;'}=post.prominence
I believe the error should be in .span6 but i am not sure. This file is only 112 lines long and the error is on line 115. help is appreciated
You have two comments (or at least, I think you were commenting in your code) on 116 and 177 that are not prefixed by
-#3 bestand#5 bestmay need to become-#3bestand-#5best