Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
af1a3391
Commit
af1a3391
authored
Aug 07, 2013
by
Izaak Alpert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a wiki when wiki_enabled:true
Change-Id: I7aaab4b1f54fd2719a8a63d9069ddd5c59868e34
parent
e8d1e827
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
app/contexts/projects/create_context.rb
app/contexts/projects/create_context.rb
+9
-0
No files found.
app/contexts/projects/create_context.rb
View file @
af1a3391
...
...
@@ -46,6 +46,15 @@ module Projects
@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
@project
.
discover_default_branch
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment