diff options
author | James McKinney <james@slashpoundbang.com> | 2011-10-16 20:20:30 -0400 |
---|---|---|
committer | James McKinney <james@slashpoundbang.com> | 2011-10-16 20:21:54 -0400 |
commit | 84ed8c5686760cf78c8da89a22591faa331ef332 (patch) | |
tree | e3e76232cf21d7836c937c14bbb33613540a4247 | |
parent | abbf7b4b9ae8f18d00ff4d92516d853aeacf8724 (diff) |
CSV::Reader#parse doesn't exist in 1.9. Using CSV#parse works in both 1.8 and 1.9
-rw-r--r-- | app/models/public_body.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index ab836657b..15ff27e0d 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -360,7 +360,7 @@ class PublicBody < ActiveRecord::Base set_of_importing = Set.new() field_names = { 'name'=>1, 'request_email'=>2 } # Default values in case no field list is given line = 0 - CSV::Reader.parse(csv) do |row| + CSV.parse(csv) do |row| line = line + 1 # Parse the first line as a field list if it starts with '#' |