Skip to content
Browse files

id dump support

  • Loading branch information...
1 parent c3899d7 commit 4b10a889d2709f3952b5c9dea96c1d9996db1531 @Slike9 Slike9 committed Aug 27, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/seed_dumper/fetcher.rb
View
4 lib/seed_dumper/fetcher.rb
@@ -22,7 +22,9 @@ def self.fetch_data(klass, options={})
end
end
- "#{model_name.camelize}.create(#{attr_s.join(', ')})"
+ record_dump = "#{model_name.camelize}.create(#{attr_s.join(', ')})"
+ record_dump = "#{record_dump}{|record| record.id = #{record.attributes['id']}}" if options[:dump_id] && record.attributes['id']
+ record_dump
end
# / records.each_with_index

0 comments on commit 4b10a88

Please sign in to comment.
Something went wrong with that request. Please try again.