Sha256: 68c672bce0714613f57a736c4bbbf3013abcea80347df856526258457f82a637
Contents?: true
Size: 646 Bytes
Versions: 87
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true module Alchemy module Admin module CropAction extend ActiveSupport::Concern included do before_action :load_croppable_resource, only: [:crop] end def crop @picture = Alchemy::Picture.find_by(id: params[:picture_id]) if @picture @croppable_resource.picture = @picture @settings = @croppable_resource.image_cropper_settings @element = @croppable_resource.element else @no_image_notice = Alchemy.t(:no_image_for_cropper_found) end render template: "alchemy/admin/crop" end end end end
Version data entries
87 entries across 87 versions & 1 rubygems