I'm trying to make an ajax call to a rails (5.1.3) app. I want the targeted action in the controller to render a status code 200 and do nothing else. Here's how the action looks like.
def some_delete_action
respond_to do |format|
format.js do
render status: 200, layout: false
end
end
end
The issue is that rails tries to load the template associated with that action. Since there's no such template in my app, I get a ActionView::MissingTemplate
error.
How can I render the status code without having rails try to reach for the template ?