Pushed widget improved

This commit is contained in:
randx 2012-06-21 18:41:22 +03:00
parent ed247b3893
commit 77cf662034
7 changed files with 22 additions and 16 deletions

View file

@ -48,8 +48,8 @@ module Account
end
def recent_push project_id = nil
# Get push events not earlier than 6 hours ago
events = recent_events.code_push.where("created_at > ?", Time.now - 6.hours)
# Get push events not earlier than 2 hours ago
events = recent_events.code_push.where("created_at > ?", Time.now - 2.hours)
events = events.where(:project_id => project_id) if project_id
# Take only latest one