Skip to content

Instantly share code, notes, and snippets.

@MarkPochert
Created October 26, 2011 18:05
Show Gist options
  • Save MarkPochert/1317181 to your computer and use it in GitHub Desktop.
Save MarkPochert/1317181 to your computer and use it in GitHub Desktop.
-if @items.size > 0
#result_table
%table
%tr
%td Activ
%td Item_ID
%td Title
%td Price
%td Sold
- @items.each do |item|
%tr{id: "#{item.id}"}
%td
%input.remove_box{type: 'checkbox', value: "#{item.id}", checked: item.quantity_sold > 0 }
%td= item.id
%td= item.title
%td= item.price
%td= item.quantity_sold
$('#results').html("<%= escape_javascript(render(:partial => 'searchresult'))%>")
# HER JSON
@test_data = "<%= @items.as_json %>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment