Mercurial > hg > soundsoftware-site
comparison test/exemplars/.svn/text-base/issue_exemplar.rb.svn-base @ 0:513646585e45
* Import Redmine trunk SVN rev 3859
author | Chris Cannam |
---|---|
date | Fri, 23 Jul 2010 15:52:44 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:513646585e45 |
---|---|
1 class Issue < ActiveRecord::Base | |
2 generator_for :subject, :method => :next_subject | |
3 generator_for :author, :method => :next_author | |
4 generator_for :priority, :method => :fetch_priority | |
5 | |
6 def self.next_subject | |
7 @last_subject ||= 'Subject 0' | |
8 @last_subject.succ! | |
9 @last_subject | |
10 end | |
11 | |
12 def self.next_author | |
13 User.generate_with_protected! | |
14 end | |
15 | |
16 def self.fetch_priority | |
17 IssuePriority.first || IssuePriority.generate! | |
18 end | |
19 | |
20 end |