summaryrefslogtreecommitdiffstats
path: root/test/exemplars/document_exemplar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/exemplars/document_exemplar.rb')
-rw-r--r--test/exemplars/document_exemplar.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/exemplars/document_exemplar.rb b/test/exemplars/document_exemplar.rb
new file mode 100644
index 000000000..ae9a4a25a
--- /dev/null
+++ b/test/exemplars/document_exemplar.rb
@@ -0,0 +1,9 @@
+class Document < ActiveRecord::Base
+ generator_for :title, :method => :next_title
+
+ def self.next_title
+ @last_title ||= 'Document001'
+ @last_title.succ!
+ @last_title
+ end
+end