summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-25 11:59:25 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-25 11:59:25 +0100
commit5f7a3e1bbdcb6044e4b25d0a7722b10f9140bb46 (patch)
tree36f9c7a85a0dd20f0b271df464eed45c36e969b5 /app/models/project.rb
parent769d1ce64bdb7c9fd3981c65bc25dd14eb176c1e (diff)
parenta30a56634d3ea44ccfc69c037324b502456f9aba (diff)
downloadgitlab-ce-5f7a3e1bbdcb6044e4b25d0a7722b10f9140bb46.tar.gz
Merge branch 'master' into extend_markdown_upload
# Conflicts: # app/controllers/files_controller.rb
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 932cfc980a2..2d46b7d7a95 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -48,6 +48,12 @@ class Project < ActiveRecord::Base
default_value_for :wall_enabled, false
default_value_for :snippets_enabled, gitlab_config_features.snippets
+ # set last_activity_at to the same as created_at
+ after_create :set_last_activity_at
+ def set_last_activity_at
+ update_column(:last_activity_at, self.created_at)
+ end
+
ActsAsTaggableOn.strict_case_match = true
acts_as_taggable_on :tags