model send events to controller?

  2 posts   Feedicon  
Replies: 1 - Last Post: November 06, 2009 14:27
by: Logan Barnett
showing 1 - 2 of 2
 
Posted: November 03, 2009 22:12 by russ.sherman

if my model performs an expensive process (perhaps in a thread) how does the model send a message to the controller upon completion of the load...
 
Posted: November 06, 2009 14:27 by Logan Barnett

Pure Ruby! Use a block

# in the model

def long_process
  do_stuff_for_a_long_time
  yield
end

# in the controller
model.long_process do
  # long process is done!
  update_view
end
Replies: 1 - Last Post: November 06, 2009 14:27
by: Logan Barnett
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close