In a model, I include a module used by a Rake task.
I would like to do this include only for rake and not for Rails.
I didn’t find any method to know if the model is used by Rails or Rake.
I use Rails3.0.beta3.
If you have any idea i would be glad to hear them 🙂
Thanks
You can solve your problem with defined variable.
You define a variable into your rake task
And in your model you test it with defined?