galetahub/ckeditor

View on GitHub
lib/generators/ckeditor/templates/active_record/active_storage/ckeditor/picture.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class Ckeditor::Picture < Ckeditor::Asset
  # for validation, see https://github.com/igorkasyanchuk/active_storage_validations

  def url_content
    rails_representation_url(storage_data.variant(resize: '800>').processed, only_path: true)
  end

  def url_thumb
    rails_representation_url(storage_data.variant(resize: '118x100').processed, only_path: true)
  end
end