Commit 255c7f98d05aab01b3ecc9b0ac4d0ee21127e6be
1 parent
b0c41ba1
Exists in
master
and in
27 other branches
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 | 64 | users = User.connection.execute(command) |
| 65 | 65 | csv_content = "name;email\n" |
| 66 | 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 | 69 | render :text => csv_content, :content_type => 'text/csv', :layout => false |
| 70 | 70 | end | ... | ... |