RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: jamillion
Site: http://elbii.com
To 43. zhubo:
You don't have to remove the respond_to block.
Just add another responder in there to respond to javascript like so:
respond_to do |format| format.html # index.html.erb format.xml { render :xml => @products } format.js # index.js.erb end
To 43. zhubo:
You don't have to remove the respond_to block.
Just add another responder in there to respond to javascript like so:
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @products }
format.js # index.js.erb
end