Commit af1a3391 authored by Izaak Alpert's avatar Izaak Alpert

Create a wiki when wiki_enabled:true

Change-Id: I7aaab4b1f54fd2719a8a63d9069ddd5c59868e34
parent e8d1e827
...@@ -46,6 +46,15 @@ module Projects ...@@ -46,6 +46,15 @@ module Projects
@project.creator = current_user @project.creator = current_user
if @project.valid? && @project.wiki_enabled?
begin
#force the creation of a wiki,
GollumWiki.new(@project, current_user).wiki
rescue => exception
@project.errors.add(:wiki_enabled, 'cannot create wiki')
end
end
if @project.save if @project.save
@project.discover_default_branch @project.discover_default_branch
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment