Class: Maglev::PersistSectionScreenshot
- Inherits:
-
Object
- Object
- Maglev::PersistSectionScreenshot
- Includes:
- Injectable
- Defined in:
- app/services/maglev/persist_section_screenshot.rb
Overview
Used to create a screenshot of a section from the Maglev admin UI.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/services/maglev/persist_section_screenshot.rb', line 16 def call return false if base64_image.blank? image_data = Base64.decode64( base64_image['data:image/png;base64,'.length..] ) persist_file(image_data) section. = Time.now.to_i true end |