Work with models in your JavaScript in your Rails