Pastable version of Combining javascript for 2+ models