diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-05-04 04:39:41 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-05-04 21:36:04 +0300 |
commit | 56db54d3e53f5bac4aa5190d3189f015e3fdbfa7 (patch) | |
tree | 9cacf9ea5213cd5becef50257d89589e2f68c1c2 /app/models | |
parent | 341964da45460d5c6593d0e08178ecf61e726e91 (diff) |
Set last_repository_updated_at to created_at upon project creation
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 5 |
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 |