headers["Status"] = "301 Moved Permanently" redirect_to "http://www.newdomain.com"
Then there was:
head :moved_permanently, :location => book_url(@book)
As of [7820] on 2007/10/09, there's a new redirector in town.
# Examples: # redirect_to post_url(@post), :status=>:found # redirect_to :action=>'atom', :status=>:moved_permanently # redirect_to post_url(@post), :status=>301 # redirect_to :action=>'atom', :status=>302
sweet.
see: http://dev.rubyonrails.org/changeset/7820