BaseContext

Controllers refactoring with contexts
Move commit compare logic to model
This commit is contained in:
Dmitriy Zaporozhets 2012-07-20 08:39:34 +03:00
parent 3c6daec4b1
commit 3063af5adc
11 changed files with 130 additions and 62 deletions

View file

@ -28,6 +28,10 @@ class Event < ActiveRecord::Base
end
end
def self.recent_for_user user
where(:project_id => user.projects.map(&:id)).recent
end
# Next events currently enabled for system
# - push
# - new issue