diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-02 17:05:08 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-02 17:05:08 +0400 |
commit | d10b34a685509eebbe52391ffce861cde45cc0ca (patch) | |
tree | 0df013d6d209ec62a52588eb5b9adb1bbac6b6a1 /app/models | |
parent | 87c397f5774c4c11ba2e4c55098920c081e53670 (diff) |
Save repository size to projects table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 3ae47c18136..45aeaceef83 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -562,4 +562,8 @@ class Project < ActiveRecord::Base def forked_from?(project) forked? && project == forked_from_project end + + def update_repository_size + update_attribute(:repository_size, repository.size) + end end |