Sha256: 68c672bce0714613f57a736c4bbbf3013abcea80347df856526258457f82a637

Contents?: true

Size: 646 Bytes

Versions: 91

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

91 entries across 91 versions & 1 rubygems

Version Path
alchemy_cms-6.0.13 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.1.3 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.1.2 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.1.1 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.1.0 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.12 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.11 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.10 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.9 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.8 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.7 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.6 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.5 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.4 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.3 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.2 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.1 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.0 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.0.pre.rc7 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.0.0.pre.rc6 app/controllers/concerns/alchemy/admin/crop_action.rb