conradwt/catarse — Issue #6: Expecting kEND when returning with authenticated user
Author: kevinsteger
Created: 2011-12-09 04:35:18+00:00
State: open

When returning from a successful oAuth call (tested with Google and Twitter) the site throws an exception

SyntaxError in Projects#index

Showing /projects/catarse/app/views/layouts/_pre_header.html.haml where line #1 raised:

/projects/catarse/app/models/backer.rb:47: syntax error, unexpected ':', expecting kEND
validates :token, uniqueness: true
^
/projects/catarse/app/models/backer.rb:48: syntax error, unexpected ':', expecting kEND
validates :identifier, uniqueness: true
^
(this goes on and on reporting errors for backer.rb)

Extracted source (around line #1):

1: - if current_user and (not current_user.backs.project_visible(current_site).display_notice.empty? or not current_user.notifications.where(:site_id => current_site.id).not_dismissed.empty?)
2: #pre_header
3: - current_user.backs.project_visible(current_site).display_notice.each do |back|
4: %div{:id => "back_notice_#{back.id}", :class => "back_notice"}

APPLICATION TRACE

app/views/layouts/_pre_header.html.haml:1:in `_app_views_layouts__pre_header_html_haml__244878583_70318489485340'
app/views/layouts/application.html.haml:7:in `_app_views_layouts_application_html_haml___322973760_70318489104620'
app/controllers/projects_controller.rb:29:in `index'

The session dump shows a successful authentication coming back from Google and Twitter.