move_to_bottom doesn't work
|
|
Hello all, I’m currently going through the Monkey Tasks project and I’m up to page 78 of the book, where the tasks are being marked complete. Now, I’m using Rails 1.2.6 on Windows and I did add acts_as_list :scope => :schedule to the todo model. My problem is that the task is not being moved to the bottom when it’s being marked complete. Is this functionality introduced later in the book, or is there a problem somewhere? I can post the code I have, if it will help. Thanks |
|
|
Hi batasrki, The move_to_bottom method should take care of that for you. The big question will be to determine if the mark_compete call is succeeding or if it’s failing for some reason on the server. When you mark a task complete – does the task get crossed out but not move to the bottom or does nothing happen? If you mark a task complete and then hit refresh on the browser – are the tasks correctly re-ordered then (i.e. the competed task is now at the bottom)? If you look at the end of the log/development.log after marking a task complete – are there a bunch of errors in the log? I’ve got an appointment this evening and then I’ll be at the gym for awhile but if those questions didn’t help you troubleshoot the problem – you can always zip up a copy of the application in it’s current state and email it to my gmail account (alameda.eldon) and I’ll take a look at it late tonight when i get home. |
|
|
Hi Eldon, Thanks for the quick response. The mark_complete call succeeds, since the task name gets crossed out. However, as you have said it does not move to the bottom as it should. Also, when I refresh page, the tasks stay in the same order, that is the completed tasks are not correctly ordered. Could this problem be the result of sorting somewhere? I will check my development log tonight and let you know if there are any errors. Also, do you want the entire app zipped and sent or any specific parts? Thanks again |
|
|
zip the entire app and upload into any file hosting or your website if u have one…. |
|
|
Yeah – it’s easiest for me if you zip the entire app – just in case the problem is somewhere less obvious – like a problem in the model or a problem with a route. |
|
|
Hi Eldon, I sent you my version of MonkeyTasks, zipped, to your gmail address. I’m going to keep working on the problem, too. Thanks |
|
|
Got your email and tested out the app that you had sent me. Unfortunately though – I can’t duplicate the error that you’re having. When i mark a task as complete it crosses it out and moves the item to the bottom of the list. So I’m puzzled. If after restarting your application – if you’re still seeing the issue – could you do a couple things for me.
thanks |