0
我是HAML的新手,我遇到下面的代碼問題。我繼續得到錯誤「C:/Users/Dalcom/Desktop/task_tracker/app/views/events/index.html.haml:55:語法錯誤,意外的keyword_ensure,期待輸入結束」。期待輸入錯誤終止
我的觀點看起來像這樣:
#content
#tab1
-if @events.exists?
%table.table.table-hover
%tr
%th Name
%th Priority
%th Event
%th Deadline
%th Event Description
%th Event Comment
%th Complete?
[email protected] do |event|
%tr
%td=event.initials
%td=event.priority
%td=event.event_name
%td.deadline=event.deadline.strftime("%m-%d %H:%M")
%td.description=event.event_description
%td.comment
-if event.comment.present?
=event.comment
=link_to 'Comments Go Here', edit_event_path(event)
-else
=link_to 'Comments Go Here', edit_event_path(event)
%td
=form_for event do |f|
=f.check_box(:complete)
=f.submit 'Complete?'
-else
%p There are no events to be completed!
閱讀最多的HAML我敢肯定它與我的縮進做的,但錯誤是太可怕了,我不knwo哪裏找。