Hi, guys.  I wrote a rake task that called a method in model A.
in app.rake
  task :update_number => :environment do
    A.update_method
  end

in model A
  def self.update_method
    t1 = A.find.all
    ...
    ..
  end

When I ran the rake task, it returned an error "undefined local variable
or method t1".  If I copied codes in the method to app.rake, it worked
perfectly.  Did I miss something when I called the method in model from
rake?
Thanks in advance.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to