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

How do I call multiple model methods and send email through my rake task?

+2


source to share


1 answer


In your rake task you need to depend on the environment. After you can use all the models.



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

      

+7


source







All Articles