Hello,

I'm trying to use some methods I'm defining in a module in a model and
my rake task.  How can I do this?  Any help would be appreciated.

I've currently got the following, but my rake task can't access the
methods in my module. Instead, I get..

undefined local variable or method `report_csv_process' for
#<Object:0x284f9e8>


/lib/module/order_process
module order_process
  def process_order(id)
     #do stuff
  end


/lib/tasks/ordering.rake

include order_process
namespace :send_report do
  task :order => :environment do
     process_order(id)
  end
end

/app/models/segment.rb
class Segment < ActiveRecord::Base
  include report_csv_process

   bla bla

end
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to