diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-03 09:52:14 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-03 09:52:14 +0200 |
| commit | d6036f08aa94fa5a45b569fc8b9e80f064496bcf (patch) | |
| tree | a1ae3e66044c83116cf8d2dd7d860590b20f7613 /app/models | |
| parent | ce84e3f440e5f737ca808fd88cf54caefeda6b81 (diff) | |
| download | gitlab-ce-d6036f08aa94fa5a45b569fc8b9e80f064496bcf.tar.gz | |
move activated? method to service
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/gitlab_ci_service.rb | 4 | ||||
| -rw-r--r-- | app/models/service.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/gitlab_ci_service.rb b/app/models/gitlab_ci_service.rb index a2f5634a86f..0b0b65e2863 100644 --- a/app/models/gitlab_ci_service.rb +++ b/app/models/gitlab_ci_service.rb @@ -23,10 +23,6 @@ class GitlabCiService < Service after_save :compose_service_hook, if: :activated? - def activated? - active - end - def compose_service_hook hook = service_hook || build_service_hook hook.url = [project_url, "/build", "?token=#{token}"].join("") diff --git a/app/models/service.rb b/app/models/service.rb index 17a7a656de5..d3486d29200 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -20,4 +20,8 @@ class Service < ActiveRecord::Base has_one :service_hook validates :project_id, presence: true + + def activated? + active + end end |
