mirror of
https://github.com/redmine/redmine.git
synced 2024-08-27 17:54:48 +02:00
![Eric Davis](/assets/img/avatar_default.png)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3340 e93f8b46-1217-0410-a6f0-8f06a7374b81
22 lines
471 B
Ruby
22 lines
471 B
Ruby
class WikiRedirect < ActiveRecord::Base
|
|
generator_for :title, :method => :next_title
|
|
generator_for :redirects_to, :method => :next_redirects_to
|
|
generator_for :wiki, :method => :generate_wiki
|
|
|
|
def self.next_title
|
|
@last_title ||= 'AWikiPage'
|
|
@last_title.succ!
|
|
@last_title
|
|
end
|
|
|
|
def self.next_redirects_to
|
|
@last_redirect ||= '/a/path/000001'
|
|
@last_redirect.succ!
|
|
@last_redirect
|
|
end
|
|
|
|
def self.generate_wiki
|
|
Wiki.generate!
|
|
end
|
|
end
|