the code
respond_to do |format|
format.html
format.json { render :json => @switches }
format.xml { render :xml => @switches.to_xml }
format.all { r
You may find it useful to watch this episode of railscasts, which illustrates the changes to controllers in Rails 3 and in particular the changes to the responder class (putting respond_to in the controller class itself and only using respond_with @object in the action):
http://railscasts.com/episodes/224-controllers-in-rails-3