Skip to content
Snippets Groups Projects
Unverified Commit e8942eaa authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

valid for publication

parent 7cf804f7
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,11 @@ class Communication::Website::GithubFile < ApplicationRecord
end
def valid_for_publication?
return about.published? if about_type == 'Communication::Website::Post'
true
case about_type
when 'Communication::Website::Page', 'Communication::Website::Post'
about.published?
else
true
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment