Displaying 1 result from an estimated 1 matches for "parts_url".
Did you mean:
parts_r
2011 Sep 06
8
Ajax and rails 3 UJS (jquery)
...tall"
3) set up the controller action, destroy to respond by giving a json
object when it''s being called by ajax
# DELETE /parts/1
# DELETE /parts/1.xml
def destroy
@part = Part.find(params[:id])
@part.destroy
respond_to do |format|
format.html { redirect_to(parts_url) }
format.xml { head :ok }
format.js {
render :json => {:name => ''John''}
}
end
end
4) added the following to application.js
// Place your application-specific JavaScript functions and classes
here
// This file is automatically included by
java...