Displaying 2 results from an estimated 2 matches for "lineprice".
2008 Sep 03
2
Highlighint rjs problem on a new product
...xists inside the table, the highlight effect works. Is this 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><%= prod...
2008 Sep 03
0
saving to mysql while displaying a partial that calls for the list of mysql items lags
...of my highlighting question but now after
debugging and slicing up the problem i found that the problem was not
rjs but that saving to database does not sync with the 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=pa...