Index: trunk/lib/activity_log.rb =================================================================== --- trunk/lib/activity_log.rb (revision 15) +++ trunk/lib/activity_log.rb (revision 16) @@ -41,15 +41,15 @@ end # options are :culprit, :referenced, :activity_loggable, :limit - def self.find_for(options={}) + def self.find_with(options={}) limit = (options.delete(:limit) || 10) conditions = [] conditions << self.send(:sanitize_sql, ["culprit_id = ?", options[:culprit]]) if options.keys.include? :culprit conditions << self.send(:sanitize_sql, ["referenced_id = ?", options[:referenced]]) if options.keys.include? :referenced conditions << self.send(:sanitize_sql, ["activity_loggable_id = ?", options[:activity_loggable]]) if options.keys.include? :activity_loggable - self.find(:all, :conditions => conditions, :limit => limit) - # rescue - # raise "I couldn't run the find with the options you gave me" + self.find(:all, :conditions => conditions.join(" AND "), :limit => limit) + rescue + raise "I couldn't run the find with the options you gave me, sorry" end private