Defect #12 ยป cant-edit-project-if-no-wiki.patch
app/controllers/projects_controller.rb (working copy) | ||
---|---|---|
120 | 120 |
if params[:wiki_enabled] |
121 | 121 |
case params[:wiki_enabled] |
122 | 122 |
when "0" |
123 |
@project.wiki.destroy |
|
123 |
@project.wiki.destroy if @project.wiki
|
|
124 | 124 |
when "1" |
125 | 125 |
@project.wiki ||= Wiki.new |
126 | 126 |
@project.wiki.update_attributes params[:wiki] |