Reputation: 731
I have a method I want to call using AJAX in rails but I have no idea how to do so. The method is private and has no view. Right now all it SHOULD do is replace a div tags html to show a flash[:notice].
Upvotes: 0
Views: 155
Reputation: 3275
You can't call a private method via AJAX. All ajax does is make an HTTP request just like visiting a page in the browser, only asynchronously. You need to make the method into a controller action.
Upvotes: 4