/ Published in: Rails
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# CHANGED: Don't do this. # if request.xhr? # render :action => "add_with_ajax" # else # redirect_to :controller => "catalog" # end respond_to do |format| format.html {redirect_to :controller => "catalog"} format.js {render :action => "add_with_ajax"} end
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)