diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-19 20:12:56 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-01-31 22:55:28 +0000 |
commit | 06d96a9a624d31294bdf16a4662aaa7121274061 (patch) | |
tree | dc6c17d67fa7894b632ac51d48f94dbaf6732e12 /app/models/project.rb | |
parent | 8a861c87bf8ba71d5c1a479c8118d9ed6aaf8e88 (diff) | |
download | gitlab-ce-06d96a9a624d31294bdf16a4662aaa7121274061.tar.gz |
Introduce pages_deployed? to Project model
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 73a642e1580..a1034e80b6c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1164,9 +1164,11 @@ class Project < ActiveRecord::Base ensure_runners_token! end - def pages_url - return unless Dir.exist?(public_pages_path) + def pages_deployed? + Dir.exist?(public_pages_path) + end + def pages_url # The hostname always needs to be in downcased # All web servers convert hostname to lowercase host = "#{namespace.path}.#{Settings.pages.host}".downcase |