On Feb 26, 2006, at 6:33 PM, Lon Baker wrote:
> I am having a devil of a time with some runner actions.
>
> I can not seem to call any instance methods on found records.
>
> Even when I strip is down to the basics:
>
> def self.deliver
> self.find(:all, :conditions => ["#{Message.table_name}.status
> = ?", ''pending''], :include => [:site,
:template]).each {|m|
> logger.info m.is_recurring? # my method
> logger.info m.new_record? # ar method
> }
> end
def self.deliver
find(:all, :conditions => ["#{Message.table_name}.status = ?",
''pending''], :include => [:site, :template]).each {|m|
logger.info m.is_recurring? # my method
logger.info m.new_record? # ar method
}
end
Try that instead. If that doesn''t work try self.class.find :all ...
-Ezra
>
> Both logger entries show black lines in the logger.
>
> Nothing seems to work.
>
> This object uses STI, could that be the problem?
>
> --
>
> Lon Baker
> http://www.speedymac.com
> AIM: spdemac
>
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>