view test/exemplars/user_exemplar.rb @ 1021:967fb7e62b1d browsing

Include only public projects in busy institutions / projects queries, so results can be cached (the tag cloud was already public projects only). Introduce tentatively some cacheing thingies
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 13 Nov 2012 10:35:23 +0000
parents cbb26bc654de
children
line wrap: on
line source
class User < Principal
  generator_for :login, :start => 'user1'
  generator_for :mail, :method => :next_email
  generator_for :firstname, :start => 'Bob'
  generator_for :lastname, :start => 'Doe'

  def self.next_email
    @last_email ||= 'user1'
    @last_email.succ!
    "#{@last_email}@example.com"
  end
end