I have this setup:
class UsersController < InheritedResources::Base respond_to :html, :js, :xml, :json def index @users = User.all respond_wi
Assuming you need JSON for an Ajax request
class UsersController < InheritedResources::Base respond_to :html, :js, :xml, :json def index @users = User.all respond_with(@users, :layout => !request.xhr? ) end end
This seems like the cleanest solution to me.