Displaying 1 result from an estimated 1 matches for "update_th".
Did you mean:
updatesth
2008 Apr 16
2
QUICK QUESTION: Run a Ruby File inside of Model
Hi,
I''m trying to run a ruby file in lib from inside of a model. How can I
run a ruby file from inside of a model?
In this example, Thing.rb is my model. I''m trying to run do_update.rb.
How can I call this from inside of Thing.rb?
Thing.rb
**********************
def update_things delete_cache
things = Thing.find(:all, :conditions => "updated = false")
### Run an updater in "lib/updater/do_update.rb"
#### What goes on this line? # ruby script/runner do_update.rb
end
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------...