Given the following:
ListItem (position, title)
1,hello
2,hello2
3,hello3
4,hello4
5,hello5
If the 3rd item, 3,hello3 was deleted, is there a way for the positions to automatically update, ie, position 5 would now be position 4?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at ranked-model: https://github.com/mixonic/ranked-model. I’ve used it with success on a Rails 3 app and it was very easy to set up.