Skip to content

Commit

Permalink
[#3015] Updated exemplars
Browse files Browse the repository at this point in the history
  • Loading branch information
edavis10 committed Sep 12, 2009
1 parent 81ed7ed commit 9a00e30
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions test/exemplars/member_exemplar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Member < ActiveRecord::Base
end
8 changes: 5 additions & 3 deletions test/exemplars/project_exemplar.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
class Project < ActiveRecord::Base
generator_for :name, :method => :next_name
generator_for :identifier, :method => :next_identifier
generator_for :identifier, :method => :next_identifier_from_object_daddy

def self.next_name
@last_name ||= 'Project 0'
@last_name.succ!
@last_name
end

def self.next_identifier

# Project#next_identifier is defined on Redmine
def self.next_identifier_from_object_daddy
@last_identifier ||= 'project0'
@last_identifier.succ!
@last_identifier
end
end
8 changes: 8 additions & 0 deletions test/exemplars/role_exemplar.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Role < ActiveRecord::Base
generator_for :name, :method => :next_name

def self.next_name
@last_name ||= 'Role0'
@last_name.succ!
end
end

0 comments on commit 9a00e30

Please sign in to comment.