class Administrate::Field::Paperclip

Constants

DEFAULT_BIG_STYLE
DEFAULT_THUMBNAIL_STYLE

Public Instance Methods

style(size = big_style) click to toggle source
# File lib/administrate/field/paperclip.rb, line 10
def style(size = big_style)
  data.try(:url, size) || ''
end
Also aliased as: url
thumbnail() click to toggle source
# File lib/administrate/field/paperclip.rb, line 16
def thumbnail
  style(thumbnail_style)
end
url(size = big_style)
Alias for: style
url_only?() click to toggle source

Just display the URL as a link, rather than trying to make it an image

# File lib/administrate/field/paperclip.rb, line 21
def url_only?
  options.fetch(:url_only, false)
end

Private Instance Methods

big_style() click to toggle source
# File lib/administrate/field/paperclip.rb, line 36
def big_style
  options.fetch(:big_style, DEFAULT_BIG_STYLE)
end
thumbnail_style() click to toggle source
# File lib/administrate/field/paperclip.rb, line 32
def thumbnail_style
  options.fetch(:thumbnail_style, DEFAULT_THUMBNAIL_STYLE)
end