Mercurial > hg > soundsoftware-site
view test/exemplars/attachment_exemplar.rb @ 483:cc267eb99115 feature_36
removed unnecessary rjs file; extending the User Model to handle Users with no Author.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 07 Jul 2011 18:20:31 +0100 |
parents | 1d32c0a0efbf |
children |
line wrap: on
line source
class Attachment < ActiveRecord::Base generator_for :container, :method => :generate_project generator_for :file, :method => :generate_file generator_for :author, :method => :generate_author def self.generate_project Project.generate! end def self.generate_author User.generate_with_protected! end def self.generate_file @file = ActiveSupport::TestCase.mock_file end end