search for: listform

Displaying 3 results from an estimated 3 matches for "listform".

2006 Aug 17
3
What''s the best way to stop repeating this line in my controller?
...renders the list, I have (for example, in the Lists controller): def index @lists = List.find(:all) end Now within the controller there''s also a list_add action which is called via ajax.. def list_add if List.create(params[:list]) @lists = List.find(:all) render(:partial => "listform") end end I need to put the @lists = List.find(:all) in it again so it gets the new updated list to render via AJAX like I did in the index action, and I have to do this for every action I need... Is there a way to do this so I can stop repeating myself? Or am I outta luck? Thanks.
2006 Mar 17
1
How to update values in database in this form?
Hi, This is my rHtml page & Corresponding actions & model pages:- ===listform.rHtml================= <h1>Products List</h1> <%= start_form_tag(:action => "add_to_cart")%> <table> <tr> <% i=0 %> <th> Product No. </th> <th> Unit Price </th> <th> Available Qty. </th> <th> Demand Qty. &lt...
2006 Apr 27
0
Trigger ajax form submission with drop_receiving_element
...:accept => "categories", :loading => "Element.show(''indicator'')", :complete => "new Ajax.Updater(''list'', ''/review/refresh'', {asynchronous:true, evalScripts:true, parameters:Form.serialize(document.listform)});Element.hide(''indicator'')"%> the action ''add'' add my element to the list, my ''listform'' form is refreshed by submitting the form through the ''/review/refresh'' action. it works well like this but, this make 2 ajax...