Displaying 2 results from an estimated 2 matches for "groceries_id".
2008 Sep 03
2
Highlighint rjs problem on a new product
...s because
the partial must only have only one <tr></tr> in it and the <table>
must be on the other page that is rendering that partial?
View Code:
---------------------------------------
<table>
<% for product in @lineprice %>
<% if product.groceries.id == @item.groceries_id %>
<tr id="highlighted">
<% else %>
<tr>
<% end %>
<td><%= product.groceries.brand %></td>
<td><%= product.groceries.name %></td>
<td><%= product.quantity %></td>
<td><%= qx(product,...
2008 Sep 03
0
saving to mysql while displaying a partial that calls for the list of mysql items lags
...ajax partial
Controller code:
____________________________________________
def add_to_cart
@sguser = Sguser.find(params[:ad])
@lineprice = SglineItem.find(:all, :conditions => "sguser_id =
#{params[:ad]}")
if SglineItem.find(:first, :conditions => [''sguser_id =? and
groceries_id =?'', params[:ad], params[:bd]])== nil
@item = SglineItem.new
@item.sguser_id= params[:ad]
@item.groceries_id=params[:bd]
@item.save!
else
@item = SglineItem.find(:first, :conditions => [''sguser_id =? and
groceries_id =?'', params[:ad], params[:bd]])
@i...