I'm new to Rails and didn't really understand the asset pipeline by now…
I want to let a
views/product/product.js
automatically fire after the
views/product/index.html.erb
was rendered for DRY reasons.
Is there a place in the asset pipeline that calls a model.js file after loading any or a partial model.erb file?
I know how to do it manually, and dropped a
app/assets/javascripts/product.js
but then i have to call a doSomethingAfterPageload() Method in new, show. delete etc. Even better, if this works for partials as well.