Removed after_initialize methods.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8288 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2011-12-18 14:57:58 +00:00
1 parent 062fbeae80
commit 9e83ee2ddf
8 files changed
+14 -11

No files matched your search

+2 -1
View File
@@ -55,7 +55,8 @@ class WikiPage < ActiveRecord::Base
# Wiki pages that are protected by default
DEFAULT_PROTECTED_PAGES = %w(sidebar)
def after_initialize
def initialize(attributes=nil, *args)
super
if new_record? && DEFAULT_PROTECTED_PAGES.include?(title.to_s.downcase)
self.protected = true
end