app/helpers/refinery/photo_gallery/admin/photos_helper.rb in refinerycms-photo-gallery-0.1.2 vs app/helpers/refinery/photo_gallery/admin/photos_helper.rb in refinerycms-photo-gallery-0.2.0
- old
+ new
@@ -2,10 +2,14 @@
module PhotoGallery
module Admin
module PhotosHelper
def get_filename_part(filename)
- filename[0, filename.rindex('.') ]
+ if filename.present?
+ filename[0, filename.rindex('.') ]
+ else
+ ""
+ end
end
end
end
end
end