Used resources.js_wrapper as Matheuz suggested.