Easier Ajax accessbility with Rails 1.1
David writes about the new HTTP accept header handling capability coming in Rails 1.1: class CommentController < ActionController::Base def create @comment = Comment.create(params[:comment]) respond_to do |type| type.html { redirect_to :action => “index” } type.js type.xml do headers[“Location”] = url_for(:action => “show”, :id => @comment.id) render(:nothing, :status => “201 Created”) end end end end This is … Continue reading Easier Ajax accessbility with Rails 1.1
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed