view test/exemplars/comment_exemplar.rb @ 106:f6ea6ffaaeeb luisf

Migration that renames the column in ssamr table (university->institution_id)
author luisf
date Fri, 17 Dec 2010 10:28:24 +0000
parents 513646585e45
children
line wrap: on
line source
class Comment < ActiveRecord::Base
  generator_for :commented, :method => :generate_news
  generator_for :author, :method => :generate_author
  generator_for :comments => 'What great news this is.'

  def self.generate_news
    News.generate!
  end

  def self.generate_author
    User.generate_with_protected!
  end
end