Problem appears when I want to remove element from paginated table in “ajaxized” way. My tasks controller calls its destroy method in response to [DELETE] /tasks/1234, but at the end I want to redirect to index to get the list automatically refreshed.
Unfortunately, what redirect_to tasks_url at this point does is [DELETE] /tasks request.
Is there any way to force GET request instead of DELETE while redirecting from inside of destroy ?
Ok, so to sum up this question. The easiest way I found to fix the issue, is to mess a bit in routes.rb by adding:
"tasks" => "tasks#index", :via => :getand to useredirect_to tasks_url(in my case) directly in destroy action in controller.This will solve the problem with kaminari pager as well (which renders strange links in some cases).