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

Version Path
alchemy_cms-7.3.4 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.3.3 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.3.2 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.7 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.3.1 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.3.0 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.6 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.5 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.1.12 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.0.15 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-6.1.10 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.4 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.1.11 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.3 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.1.10 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.2 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.1.9 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.0.14 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.2.1 app/controllers/concerns/alchemy/admin/crop_action.rb
alchemy_cms-7.0.13 app/controllers/concerns/alchemy/admin/crop_action.rb