Ross
Ross

Reputation: 1562

How to call model /action mailer methods from a rake task in rails 2.2.2

How to call few model methods and send emails through my rake task?

Upvotes: 2

Views: 1331

Answers (1)

shingara
shingara

Reputation: 46914

In your rake task you need depend of environment. After you can use all of you Model.

task :my_task => [:environment] do
  User.all
end

Upvotes: 7

Related Questions