OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/test/exemplars/news_exemplar.rb

16 lines
373 B

class News < ActiveRecord::Base
generator_for :title, :method => :next_title
generator_for :description, :method => :next_description
def self.next_title
@last_title ||= 'A New Item'
@last_title.succ!
@last_title
end
def self.next_description
@last_description ||= 'Some content here'
@last_description.succ!
@last_description
end
end