app/models/archangel/asset.rb in archangel-0.0.5 vs app/models/archangel/asset.rb in archangel-0.0.6
- old
+ new
@@ -32,10 +32,10 @@
self.content_type = asset_object.content_type
self.file_size = asset_object.size
end
def valid_file_name
- return if /^[\w-]+\.[A-Za-z]{3}$/ =~ file_name
+ return if /^[\w-]+\.[A-Za-z]{2,}$/ =~ file_name
errors.add(:file_name, Archangel.t(:file_name_invalid))
end
end
end