diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index aa44cf3..489ca10 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -7,11 +7,12 @@ class UsersController < AdminController format.html format.xml do @users = User.find(:all, :conditions => {:environment_id => environment.id}, :include => [:person]) - render :xml => @users.to_xml( - :skip_types => true, - :only => %w[email login created_at updated_at], - :include => { :person => {:only => %w[name updated_at created_at address birth_date contact_phone identifier lat lng] } } - ) + send_data @users.to_xml( + :skip_types => true, + :only => %w[email login created_at updated_at], + :include => { :person => {:only => %w[name updated_at created_at address birth_date contact_phone identifier lat lng] } }), + :type => 'text/xml', + :disposition => "attachment; filename=users.xml" end format.csv do @users = User.find(:all, :conditions => {:environment_id => environment.id}, :include => [:person]) -- libgit2 0.21.2