Skip to content

Instantly share code, notes, and snippets.

@tensiondriven
Forked from southpolesteve/gist:1516254
Created December 24, 2011 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tensiondriven/1516275 to your computer and use it in GitHub Desktop.
Save tensiondriven/1516275 to your computer and use it in GitHub Desktop.
%h1 Listing tasks
%table
%tr
%th Name
%th Type
%th Active
%th{:style=>"width: 300px"}
- @tasks.each do |task|
%tr
%td
- #%a{:href => '/tasks/' + task.id.to_s, :class => 'btn'}
%span{:class => 'task-name-in-list'}
= task.name
= task.task_type != nil ? task.task_type.name + ', ' : ''
= task.active ? 'Active' : 'Inactive'
%td
= form_for task, :remote => true, :url => 'ajax_update' |f|
= f.collection_select :task_type_id, TaskType.all, :id, :name, {}, { :class => 'submittable'}
%td
= form_for task, :remote => true, :url => 'ajax_update' do |f|
= f.check_box :active, :class => 'submittable'
%td
= link_to 'Show', task, :class => 'btn'
= link_to 'Edit', edit_task_path(task), :class => 'btn'
= link_to 'Destroy', task, :confirm => 'Are you sure?', :method => :delete, :class => 'btn'
= link_to 'Merge', "tasks/#{task.id}/merge", :class => 'btn'
-------
SyntaxError in Tasks#index
Showing /Users/j/Dropbox/Rails/last5/app/views/tasks/index.html.haml where line #29 raised:
/Users/j/Dropbox/Rails/last5/app/views/tasks/index.html.haml:29: syntax error, unexpected keyword_ensure, expecting $end
Extracted source (around line #29):
26: = link_to 'Merge', "tasks/#{task.id}/merge", :class => 'btn'
27:
Trace of template inclusion: app/views/tasks/index.html.haml
Rails.root: /Users/j/Dropbox/Rails/last5
Application Trace | Framework Trace | Full Trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment