That's how we structure the JS in our Rails-apps.