Edge Rails Updates

Published on

New edge rails deprecations: Time#last_year is deprecated in favor of Time#prev_year Time#last_month is deprecated in favor of Time#prev_month Date#last_year is deprecated in favor of Date#prev_year Date#last_month is deprecated in favor of Date#prev_month New methods/aliases: Date#sunday: Returns a new Date representing the end of this week Time#sunday: Returns a new Time representing the end of this … Continue reading Edge Rails Updates

Edge rails: ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing

Published on

You guys must faced a situation when you need to process large number of records, for example sending newsletters. Then you must have done some sort of batch processing to save it eating up all of your memory. This feature is committed to rails core by DHH. Now you can do something like User.each and … Continue reading Edge rails: ActiveRecord::Base.each and ActiveRecord::Base.find_in_batches for batch processing