summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/wikis_controller.rb4
-rw-r--r--app/models/enabled_module.rb2
-rw-r--r--app/models/wiki.rb4
3 files changed, 2 insertions, 8 deletions
diff --git a/app/controllers/wikis_controller.rb b/app/controllers/wikis_controller.rb
index 5b753b13b..4469e3627 100644
--- a/app/controllers/wikis_controller.rb
+++ b/app/controllers/wikis_controller.rb
@@ -24,9 +24,7 @@ class WikisController < ApplicationController
# Delete a project's wiki
def destroy
if request.post? && params[:confirm] && @project.wiki
- if @project.wiki.destroy
- Wiki.create_default(@project) unless @wiki
- end
+ @project.wiki.destroy
redirect_to project_path(@project)
end
end
diff --git a/app/models/enabled_module.rb b/app/models/enabled_module.rb
index 1b97903fb..237563228 100644
--- a/app/models/enabled_module.rb
+++ b/app/models/enabled_module.rb
@@ -34,7 +34,7 @@ class EnabledModule < ActiveRecord::Base
when 'wiki'
# Create a wiki with a default start page
if project && project.wiki.nil?
- Wiki.create_default(project)
+ Wiki.create(:project => project, :start_page => 'Wiki')
end
end
end
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index 0fddeb3a9..726dcea7e 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -97,10 +97,6 @@ class Wiki < ActiveRecord::Base
end
end
- def self.create_default(project)
- create(:project => project, :start_page => 'Wiki')
- end
-
# turn a string into a valid page title
def self.titleize(title)
# replace spaces with _ and remove unwanted caracters