Skip to content
Extraits de code Groupes Projets
Valider 20ca2e2e rédigé par maxwell's avatar maxwell
Parcourir les fichiers

make Notification.for return a query, not evaluate.. also limit notifications pulled back to 25

parent 6101f57d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -17,7 +17,7 @@ class ApplicationController < ActionController::Base
@aspect = nil
@aspects = current_user.aspects.fields(:name)
@aspects_dropdown_array = @aspects.collect{|x| [x.to_s, x.id]}
@notifications = Notification.for(current_user)
@notifications = Notification.for(current_user).limit(25).all
end
end
......
......@@ -17,6 +17,6 @@ class Notification
attr_accessible :object_id, :kind, :user_id, :person_id
def self.for(user, opts={})
self.all(opts.merge(:user_id => user.id))
self.where(opts.merge(:user_id => user.id))
end
end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter