Skip to content

Instantly share code, notes, and snippets.

@bcackerman
Created August 21, 2013 18:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcackerman/6298673 to your computer and use it in GitHub Desktop.
Save bcackerman/6298673 to your computer and use it in GitHub Desktop.
Loop through large amounts of data in Rails without creating a huge object from ActiveRecord
ActiveRecord::Base.uncached do
# loop here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment