##// END OF EJS Templates
Change Role#anonymous and #non_member so they generate the record as needed....
Change Role#anonymous and #non_member so they generate the record as needed. While creating tests, it was a common occurrence to lost the builtin roles because they are only created in the migrations. This makes them behave like User#anonymous. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3363 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2816:35333367dff6
r3249:155083ec9722
Show More
issue_exemplar.rb
15 lines | 311 B | text/x-ruby | RubyLexer
class Issue < ActiveRecord::Base
generator_for :subject, :method => :next_subject
generator_for :author, :method => :next_author
def self.next_subject
@last_subject ||= 'Subject 0'
@last_subject.succ!
@last_subject
end
def self.next_author
User.generate_with_protected!
end
end