diff options
author | Stan Hu <stanhu@gmail.com> | 2016-01-08 19:00:45 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-01-11 05:12:47 +0300 |
commit | b7aa13a0cfdcd2ebd5f0dab2bc5cad222f9f379b (patch) | |
tree | cdf0772c59d4cebdf19433b62dcb92aac9d8e78f /app | |
parent | 4b4fdf58c7f358fb06bed6dae166b758465850d0 (diff) |
Before project save ensure that a runners_token exists
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 0d7341e1384..31990485f7d 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -195,6 +195,7 @@ class Project < ActiveRecord::Base validates :avatar, file_size: { maximum: 200.kilobytes.to_i } add_authentication_token_field :runners_token + before_save :ensure_runners_token mount_uploader :avatar, AvatarUploader |