2010-01-28 22:05:21 +03:00
|
|
|
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
|
2010-08-20 02:24:42 +04:00
|
|
|
@file = ActiveSupport::TestCase.mock_file
|
2010-01-28 22:05:21 +03:00
|
|
|
end
|
|
|
|
end
|