Change "_filename" to "_identifier" for carrierwave
This commit is contained in:
1 parent
5518ae362d
commit
9fcf8280fa
8 files changed
+15
-15
No files matched your search
@@ -31,7 +31,7 @@ class Design
|
||||
|
||||
def files_with_duplicate?
|
||||
[self.javascripts, self.images,self.themes].each do |objects_hash|
|
||||
ary = objects_hash.collect{ |k| k.file_filename}
|
||||
ary = objects_hash.collect{ |k| k.file_identifier}
|
||||
ary.compact!
|
||||
# debugger
|
||||
return true if(ary.count!=ary.uniq.count)
|
||||
@@ -42,7 +42,7 @@ class Design
|
||||
def files_with_noname?
|
||||
[self.javascripts, self.images,self.themes].each do |objects_hash|
|
||||
objects_hash.each{ |k|
|
||||
return true if(k.file_filename.nil? && !k.to_save?)
|
||||
return true if(k.file_identifier.nil? && !k.to_save?)
|
||||
}
|
||||
end
|
||||
false
|
||||
@@ -121,7 +121,7 @@ class Design
|
||||
|
||||
def process_object(object)
|
||||
if object.to_save
|
||||
if object.file_filename.nil?
|
||||
if object.file_identifier.nil?
|
||||
new_object = self.send(object._type.downcase.pluralize).build(object.attributes)
|
||||
new_object.file = object.file
|
||||
object.destroy
|
||||
|
||||
Reference in new issue
Block a user