stagecoachapp / Stagecoach

rails!
http://stagecoach.herokuapp.com/
2 stars 4 forks source link

Redundancy in Notifications Controller #108

Open thekashifmalik opened 12 years ago

thekashifmalik commented 12 years ago

In notifications controller there are 2 lines used to access the same list:

'self.current_user.notifications'

&

'Notification.all(:conditions => {:user_id => self.current_user.id}, :order => "created_at DESC")'

Why are 2 database calls made? Why is the first one not used?

gpeal commented 12 years ago

the first one is redundant, I'll remove it in a bit

On Wed, Apr 25, 2012 at 7:38 PM, Kalail < reply@reply.github.com

wrote:

In notifications controller there are 2 lines used to access the same list:

'self.current_user.notifications'

&

'Notification.all(:conditions => {:user_id => self.current_user.id}, :order => "created_at DESC")'

Why are 2 database calls made? Why is the first one not used?


Reply to this email directly or view it on GitHub: https://github.com/New-Media/nu-new-media-film-project/issues/108

jontonsoup commented 12 years ago

dunno...gabe?

Jonathan Friedman Northwestern University | 2013 Computer Science 321.277.0866 | friedmanj@u.northwestern.edu

On Apr 25, 2012, at 7:38 PM, Kalail wrote:

In notifications controller there are 2 lines used to access the same list:

'self.current_user.notifications'

&

'Notification.all(:conditions => {:user_id => self.current_user.id}, :order => "created_at DESC")'

Why are 2 database calls made? Why is the first one not used?


Reply to this email directly or view it on GitHub: https://github.com/New-Media/nu-new-media-film-project/issues/108

gpeal commented 12 years ago

@kalail Kashif, you removed that code right? I don't see it anymore and I know you were working on notifications

gpeal commented 12 years ago

@kalail ??

thekashifmalik commented 12 years ago

I don't know what this is. Check?

On Wed, May 9, 2012 at 2:49 PM, gpeal < reply@reply.github.com

wrote:

@kalail ??


Reply to this email directly or view it on GitHub:

https://github.com/New-Media/nu-new-media-film-project/issues/108#issuecomment-5609678