Mercurial > hg > soundsoftware-site
view test/exemplars/.svn/text-base/board_exemplar.rb.svn-base @ 598:c6cfe1f2eac1 feature_36
Correctly updating the fields with the author info.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Tue, 16 Aug 2011 15:36:32 +0100 |
parents | 513646585e45 |
children |
line wrap: on
line source
class Board < ActiveRecord::Base generator_for :name, :method => :next_name generator_for :description, :method => :next_description generator_for :project, :method => :generate_project def self.next_name @last_name ||= 'A Forum' @last_name.succ! @last_name end def self.next_description @last_description ||= 'Some description here' @last_description.succ! @last_description end def self.generate_project Project.generate! end end