fix bug for paperclip error: model missing required attr_accessor