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
| module ActiveRecord | |
| module Batches # :nodoc: | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end | |
| # When processing large numbers of records, it's often a good idea to do | |
| # so in batches to prevent memory ballooning. | |
| module ClassMethods | |
| # Yields each record that was found by the find +options+. The find is |
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
| Rails Rumble 'Alumni' | |
| 2007: | |
| * http://tastyplanner.com | |
| * ??? | |
| 2008: | |
| * http://prioritizd.com |
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
| # 2.3 | |
| named_scope :last_active_since, lambda { |la| la = 10.minutes.ago if la.nil?; {:conditions => ['last_active_at >= ?', la]}} | |
| # 3 scopes | |
| named_scope :last_active_since, lambda { |la| la = 10.minutes.ago if la.nil?; where('last_active_at >= ?', la) } | |
| # 3 method |
OlderNewer