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-06-19 07:54:23 +04:00
|
|
|
@file = mock_file
|
2010-01-28 22:05:21 +03:00
|
|
|
end
|
|
|
|
end
|