Refactoring: Agora o sistema se comporta bem com objetos excluidos
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user