class BoltonCms::AttachmentUploader
Public Instance Methods
cache_dir()
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 11 def cache_dir "#{Padrino.root}/public/#{mounted_as}-cache" end
dyn_resize_fill(options)
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 45 def dyn_resize_fill(options) resize_to_fill options['width'], options['height'], model.gravity end
dyn_resize_fit(options)
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 41 def dyn_resize_fit(options) resize_to_fit options['width'], options['height'] end
dyn_resize_limit(options)
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 37 def dyn_resize_limit(options) resize_to_limit options['width'], options['height'] end
dyn_resize_pad(options)
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 49 def dyn_resize_pad(options) resize_and_pad options['width'], options['height'], (options['background'] || :transparent), model.gravity end
extension_white_list()
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 16 def extension_white_list %w(jpg jpeg gif png) end
store_dir()
click to toggle source
# File lib/bolton_cms/attachment_uploader.rb, line 8 def store_dir "#{Padrino.root}/public/#{mounted_as}/#{model.page.id}" end