Created
March 5, 2009 23:29
-
-
Save dejan/74643 to your computer and use it in GitHub Desktop.
(rails 2.3 feature) batch updating all definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Definition.find_in_batches { |group| group.each { |item| item.save } } | |
Video.find_in_batches { |group| group.each { |item| item.save } } | |
AttachedImage.find_in_batches(:conditions => 'parent_id is null') { |group| group.each { |item| item.save } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment