Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created June 17, 2009 16:21
Show Gist options
  • Save agibralter/131329 to your computer and use it in GitHub Desktop.
Save agibralter/131329 to your computer and use it in GitHub Desktop.
%table
%tr
%th name
%th date
%th status
- @contexts.each do |context|
%tr{:id => "context_#{context.id}"}
%td.name= h(context.name)
%td.created_at= context.created_at.to_s(:short)
%td.status= link_to context.state_status, "##{context.id}"
:javascript
(function ($) {
$('tr#context_#{context.id}').data('id', #{context.id});
$('tr#context_#{context.id}').data('name', #{h(context.name)});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment