Closed itchy closed 11 years ago
So to be honest I'm not a huge fan of callbacks, simply because of the subtle bugs they cause like this. Can we change this to call out to an explicit method that performs the sort and the save in one shot. Maybe even introduce a new class to do it? Also throwing some tests around that method would help the clarity.
Feel free to tackle this tonight or this weekend, it's not critical. Thanks @itchy !
Will do. Yeah, my initial thought was that the rake task would be run once to clean up existing records, but I like the idea of it being on a cron job, so I will move it to a method with test and such. As nothing is 'broken', I may wait until after the weekend before I get it done -- have a handful of Mother's day activities going on.
Thanks for all your work on this site
On Fri, May 10, 2013 at 10:13 AM, Karthik Hariharan < notifications@github.com> wrote:
So to be honest I'm not a huge fan of callbacks, simply because of the subtle bugs they cause like this. Can we change this to call out to an explicit method that performs the sort and the save in one shot. Maybe even introduce a new class to do it? Also throwing some tests around that method would help the clarity.
Feel free to tackle this tonight or this weekend, it's not critical. Thanks @itchy https://github.com/itchy !
— Reply to this email directly or view it on GitHubhttps://github.com/dallasrb/dallasrb-web/pull/27#issuecomment-17725956 .
Scott Johnson
included in PR #31
This should force a save in rake sort:epic on all the non-organizer profiles, so the call back gets called that sets the sort order.