Refactoring: Agora o sistema se comporta bem com objetos excluidos

This commit is contained in:
2008-03-15 07:44:46 -03:00
parent 8d02e0d4ce
commit 4c55ce7b45
16 changed files with 114 additions and 96 deletions

View File

@@ -18,10 +18,15 @@ require 'fileutils.rb'
class Attachment < ActiveRecord::Base
belongs_to :course
generate_validations
# Plugins
acts_as_paranoid
# Associacoes
belongs_to :course
# Validacao
generate_validations
# Atributo virtual file
def file=(new_file)
@tmp_file = new_file