lib/SimpleCSVUploder.rb in SimpleCSVUploder-0.1.3 vs lib/SimpleCSVUploder.rb in SimpleCSVUploder-0.1.4
- old
+ new
@@ -24,10 +24,10 @@
def sanitize_filename(filename)
return File.basename(filename)
end
def check_duplication_filename
- if Document.where(filename: self.filename).present?
+ if Simpledocupload::Document.where(filename: self.filename).present?
errors.add(:file, 'File already exists.')
end
end
def csv_file_format