Permalink
Browse files

Ruby 1.9: Forwards compatibility change for fixtures and the new CSV …

…module [JEG2]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8544 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 3287647 commit 288553540b5b2f37497cb19357b25ac12e0498fd @NZKoz NZKoz committed Jan 3, 2008
Showing with 3 additions and 1 deletion.
  1. +2 −0 activerecord/CHANGELOG
  2. +1 −1 activerecord/lib/active_record/fixtures.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Make sure CSV fixtures are compatible with ruby 1.9's new csv implementation. [JEG2]
+
* Added by parameter to increment, decrement, and their bang varieties so you can do player1.increment!(:points, 5) #10542 [Sam]
* Optimize ActiveRecord::Base#exists? to use #select_all instead of #find. Closes #10605 [jamesh, fcheung, protocool]
@@ -717,7 +717,7 @@ def read_yaml_fixture_files
end
def read_csv_fixture_files
- reader = CSV::Reader.create(erb_render(IO.read(csv_file_path)))
+ reader = CSV.parse(erb_render(IO.read(csv_file_path)))
header = reader.shift
i = 0
reader.each do |row|

0 comments on commit 2885535

Please sign in to comment.