added :order to find_with
| 24 | 25 | |
|---|---|---|
| 43 | 43 | # options are :culprit, :referenced, :activity_loggable, :limit |
| 44 | 44 | def self.find_with(options={}) |
| 45 | 45 | limit = (options.delete(:limit) || 10) |
| 46 | order = options.delete(:order) | |
| 46 | 47 | conditions = self.build_sql_conditional_for(options) |
| 47 | self.find(:all, :conditions => conditions, :limit => limit) | |
| 48 | # rescue | |
| 49 | # raise "I couldn't run the find with the options you gave me, sorry" | |
| 48 | self.find(:all, :conditions => conditions, :limit => limit, :order => order) | |
| 50 | 49 | end |
| 51 | 50 | |
| 52 | 51 | private |
