Class: Alchemy::EssencePicture
- Inherits:
-
BaseRecord
- Object
- ActiveRecord::Base
- BaseRecord
- Alchemy::EssencePicture
- Includes:
- PictureThumbnails
- Defined in:
- app/models/alchemy/essence_picture.rb
Instance Method Summary collapse
-
#preview_text(max = 30) ⇒ String
The name of the picture used as preview text in element editor views.
-
#serialized_ingredient ⇒ String
Returns a serialized ingredient value for json api.
Methods included from PictureThumbnails
#allow_image_cropping?, #image_cropper_settings, #picture_url, #picture_url_options, #thumbnail_url, #thumbnail_url_options
Instance Method Details
#preview_text(max = 30) ⇒ String
The name of the picture used as preview text in element editor views.
45 46 47 48 49 |
# File 'app/models/alchemy/essence_picture.rb', line 45 def preview_text(max = 30) return "" if picture.nil? picture.name.to_s[0..max - 1] end |
#serialized_ingredient ⇒ String
Returns a serialized ingredient value for json api
54 55 56 |
# File 'app/models/alchemy/essence_picture.rb', line 54 def serialized_ingredient picture_url(content.settings) end |