Class: Administrate::Field::Paperclip
- Inherits:
-
Base
- Object
- Base
- Administrate::Field::Paperclip
- Defined in:
- lib/administrate/field/paperclip.rb
Defined Under Namespace
Classes: Engine
Instance Method Summary collapse
- #style(size = big_style) ⇒ Object (also: #url)
- #thumbnail ⇒ Object
-
#url_only? ⇒ Boolean
Just display the URL as a link, rather than trying to make it an image.
Instance Method Details
#style(size = big_style) ⇒ Object Also known as: url
10 11 12 |
# File 'lib/administrate/field/paperclip.rb', line 10 def style(size = big_style) data.try(:url, size) || '' end |
#thumbnail ⇒ Object
16 17 18 |
# File 'lib/administrate/field/paperclip.rb', line 16 def thumbnail style(thumbnail_style) end |
#url_only? ⇒ Boolean
Just display the URL as a link, rather than trying to make it an image
21 22 23 |
# File 'lib/administrate/field/paperclip.rb', line 21 def url_only? .fetch(:url_only, false) end |