class Gecko::Record::Image
Constants
- AVAILABLE_SIZES
Public Instance Methods
url(size = :full)
click to toggle source
URL for image
@param [Symbol] :size (:full) The image size, currently only :full,
:medium and :thumbnail supported
@return [String]
@api public
Calls superclass method
# File lib/gecko/record/image.rb, line 32 def url(size = :full) super() || build_url(size) end
Private Instance Methods
build_url(size)
click to toggle source
# File lib/gecko/record/image.rb, line 38 def build_url(size) file_path = if size == :full file_name else "#{size}_#{file_name}" end [base_path, file_path].join("/") end