unit wiki_redirect_test.rb has this test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7438
e93f8b46-1217-0410-a6f0-
8f06a7374b81
validate :validate_parent_title
before_destroy :remove_redirects
+ before_save :handle_redirects
# eager load information about last updates, without loading text
named_scope :with_updated_on, {
write_attribute(:title, value)
end
- def before_save
+ def handle_redirects
self.title = Wiki.titleize(title)
# Manage redirects if the title has changed
if !@previous_title.blank? && (@previous_title != title) && !new_record?