Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-05-04 04:39:41 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-05-04 21:36:04 +0300
commit56db54d3e53f5bac4aa5190d3189f015e3fdbfa7 (patch)
tree9cacf9ea5213cd5becef50257d89589e2f68c1c2 /app/models
parent341964da45460d5c6593d0e08178ecf61e726e91 (diff)
Set last_repository_updated_at to created_at upon project creation
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 025db89ebfd..edbca3b537b 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -53,6 +53,11 @@ class Project < ActiveRecord::Base
update_column(:last_activity_at, self.created_at)
end
+ after_create :set_last_repository_updated_at
+ def set_last_repository_updated_at
+ update_column(:last_repository_updated_at, self.created_at)
+ end
+
after_destroy :remove_pages
# update visibility_level of forks