dallasrb / dallasrb-web

The Dallas Ruby Brigade Website
10 stars 14 forks source link

fix rake task to update records that have not been changed #27

Closed itchy closed 11 years ago

itchy commented 11 years ago

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.

hkarthik commented 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 !

itchy commented 11 years ago

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

itchy commented 11 years ago

included in PR #31