Method: File.thumbnail_path

Defined in:
lib/picolena/templates/lib/core_exts.rb

.thumbnail_path(filename, public_dir = false) ⇒ Object

For a given file, returns the path at which a thumbnail should be saved



114
115
116
117
# File 'lib/picolena/templates/lib/core_exts.rb', line 114

def self.thumbnail_path(filename, public_dir=false)
  thumb=expand_path(filename).base26_hash+'.jpg'
  public_dir ? File.join('thumbnails', thumb) : File.join(RAILS_ROOT,  'public/images/thumbnails', thumb)
end