Commit 255c7f98d05aab01b3ecc9b0ac4d0ee21127e6be

Authored by Victor Costa
1 parent b0c41ba1

rails3: fix csv generation

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/controllers/admin/users_controller.rb
@@ -64,7 +64,7 @@ class UsersController < AdminController @@ -64,7 +64,7 @@ class UsersController < AdminController
64 users = User.connection.execute(command) 64 users = User.connection.execute(command)
65 csv_content = "name;email\n" 65 csv_content = "name;email\n"
66 users.each { |u| 66 users.each { |u|
67 - CSV.generate_row([u['name'], u['email']], 2, csv_content, fs=';') 67 + csv_content << CSV.generate_line([u['name'], u['email']], {:col_sep => ';'})
68 } 68 }
69 render :text => csv_content, :content_type => 'text/csv', :layout => false 69 render :text => csv_content, :content_type => 'text/csv', :layout => false
70 end 70 end