Just adding some credit where credit is due:
http://www.viget.com/inspire/extending-paul-irishs-comprehensive-dom-ready-execution/
I too have been using that for quite some time, however the main drawback
is that it does not work for ajax partial renders because the the init is
only triggered on a new page load. So I added an additional partial method
that also lets you associate partial namespaces. Sadly you need to trigger
it manually like this in your js.erb:
INIT.partial('my_controller', '_my_partial_name');
I was going to try and figure out how to make it trigger automagically with
rails, but have since been considering using an async script loader like
require.js to replace all this functionality.
peter
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby