Module: PagesCore::Admin::ImageUploadsHelper
- Included in:
- AdminHelper
- Defined in:
- app/helpers/pages_core/admin/image_uploads_helper.rb
Instance Method Summary collapse
-
#editable_dynamic_image_tag(image, width: 250, caption: false, locale: nil) ⇒ Object
Generates tags for an editable dynamic image.
- #image_uploader_tag(name, image, options = {}) ⇒ Object
Instance Method Details
#editable_dynamic_image_tag(image, width: 250, caption: false, locale: nil) ⇒ Object
Generates tags for an editable dynamic image.
7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/pages_core/admin/image_uploads_helper.rb', line 7 def editable_dynamic_image_tag(image, width: 250, caption: false, locale: nil) react_component("EditableImage", ( image, width: width, caption: , locale: locale ).merge(width: width)) end |
#image_uploader_tag(name, image, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'app/helpers/pages_core/admin/image_uploads_helper.rb', line 18 def image_uploader_tag(name, image, = {}) opts = { caption: false, locale: nil }.merge() react_component("ImageUploader", ( image, caption: opts[:caption], locale: opts[:locale] ).merge(attr: name, alternative: opts[:alternative])) end |