My Rails app includes a Movies#index page where I send AJAX requests in two scenarios:
- When I am loading more @movies
- When I am filtering @movies
I am looking for a way to render different js files based on which scenario I am handling, instead of using index.js.erb for both.
How can I best handle this situation?