Is it possible to update following data in one single query?
ID Seq
2 2
1 4
4 1
3 3
It would be best if it could be done with rails active records, else with sql query would be perfectly fine too.
Reason for doing so is I have scenario where I need to update a group of ids frequently based on ajax request. I believe having it done in single query is much more optimized.