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@3398 e93f8b46-1217-0410-a6f0-8f06a7374b81
21 lines
449 B
Ruby
21 lines
449 B
Ruby
class Issue < ActiveRecord::Base
|
|
generator_for :subject, :method => :next_subject
|
|
generator_for :author, :method => :next_author
|
|
generator_for :priority, :method => :fetch_priority
|
|
|
|
def self.next_subject
|
|
@last_subject ||= 'Subject 0'
|
|
@last_subject.succ!
|
|
@last_subject
|
|
end
|
|
|
|
def self.next_author
|
|
User.generate_with_protected!
|
|
end
|
|
|
|
def self.fetch_priority
|
|
IssuePriority.first || IssuePriority.generate!
|
|
end
|
|
|
|
end
|