Reputation: 237
I am getting a weird syntax error from rails that I don't understand.
GETTING THE FOLLOWING ERROR:
Showing /home/action/workspace/clinio/app/views/tasks/_task.html.erb where line #3 raised:
/home/action/workspace/clinio/app/views/tasks/_task.html.erb:3: syntax error, unexpected ';', expecting ':' ';@output_buffer.append=( image... ^
Extracted source (around line #3):
<% @uncompletedtasks = @task if @uncompletedtasks?%>
<li id="task_">
<div><%= image_tag "26-mini-gray-checkmark.png" %>
<a href="<%=task_path(@uncompletedtasks)%>"> <%= @uncompletedtasks.task %> </a>
</div>
</li>
Trace of template inclusion: app/views/tasks/_task.html.erb, app/views/layouts/application.html.erb
Rails.root: /home/action/workspace/clinio
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:35:in _app_views_layouts_application_html_erb__122972711486791642_46610700'
app/controllers/users_controller.rb:16:in
index'
Upvotes: 0
Views: 84
Reputation: 230481
You don't need that question mark at the end.
<% @uncompletedtasks = @task if @uncompletedtasks %>
(the purpose of this code still eludes me, though. Why would you want overwrite @uncompletedtasks
only if it has value?)
Upvotes: 3