initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
table#products-table.table.table-striped.table-hover
|
||||
tbody
|
||||
- content_for :footer do
|
||||
javascript:
|
||||
jQuery(function(){
|
||||
$.get('#{product_list_supplier_path(@supplier, format: :json).html_safe}', function(res){
|
||||
window.products = res
|
||||
body = $('#products-table tbody')
|
||||
for(category in window.products){
|
||||
body.append('<tr><td><h3>'+category+'<h3></td></tr>')
|
||||
for(iproduct in window.products[category]){
|
||||
body.append('<tr><td>'+window.products[category][iproduct].name+'</td></tr>')
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user