Converted applications controller to Rails 3 respond_with format