Here my code class SendMessageWorker < BackgrounDRb::Worker::RailsBase def do_work(args) # This method is called in it''s own new thread when you # call new worker. args is set to :args @sms2=SendMessageDetail.find_by_send_message_id(args) @sms2.each do |send_msg| @sms2 . . ... some of my logic end problem is for loop.. if i excute this code,, its telling each is undifined methiod. If i am executing without for loop its working fine. please help me...... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 12 Mar 2007, at 10:23, selvaraj wrote:> > Here my code > > class SendMessageWorker < BackgrounDRb::Worker::RailsBase > > def do_work(args) > # This method is called in it''s own new thread when you > # call new worker. args is set to :args > @sms2=SendMessageDetail.find_by_send_message_id(args) > @sms2.each do |send_msg| @sms2 > . > . > ... > some of my logic > end > > problem is for loop.. > if i excute this code,, its telling each is undifined methiod. > > If i am executing without for loop its working fine.I think you want find_*all*_by_send_message_id --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jonathan del Strother wrote:> On 12 Mar 2007, at 10:23, selvaraj wrote: > >> . >> . >> ... >> some of my logic >> end >> >> problem is for loop.. >> if i excute this code,, its telling each is undifined methiod. >> >> If i am executing without for loop its working fine. > > I think you want find_*all*_by_send_message_idya i got it. many thanks for yr reply -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---