Displaying 2 results from an estimated 2 matches for "sguser_id".
2008 Sep 03
2
Highlighint rjs problem on a new product
...> params[:id] , :bd => groceries.id } do %>
<%= submit_tag "Add to Cart" %>
<% end %>
---------------------------------------------
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...
2008 Sep 03
0
saving to mysql while displaying a partial that calls for the list of mysql items lags
...licing 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=params[:bd]
@item.save!
else
@item = SglineItem.find...