Using the following in the 'join' action of a controller
respond_to do |format|
format.html { render :layout => 'join' }
format.js
end
Making an AJAX call (text/javascript in the header) should result in the 'format.js' line returning join.rjs as formatted javascript.
In my testing I found that the html format was instead returned. Renaming join.rjs -> join.js.erb DID return the file, but NOT formatted into javascript.
Instead, renaming join.rhtml -> join.html.erb solved the problem. Now my join.rjs is properly executed.
Note: All of this code worked properly BEFORE upgrading to 2.0.2 (I was either on 1.8.x or 2.0 edge pre-2.0 release last time I verified it working, not exactly sure which.)