Hey there
I would like to know if I can call a rake task from inside my Rails App.
Something like
class MyModel < ActiveRecord::Base
after_save :run_task
def run_task
Rake.run("my:little:task")
end
end
This is the deal: I use thinking-sphinx and need to update a bunch of data
through Model.update_all. But I would like sphinx to index it just after
I''m
done, by running rake ts:index.
Is that possible?
Thanks,
Dante
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---