Sha256: 22f6f3606bd337e33a4bbc5c60b7cf5e3985a057b5949ad43e420cd19bfed8c8

Contents?: true

Size: 602 Bytes

Versions: 21

Compression:

Stored size: 602 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Admin
    class IngredientsController < Alchemy::Admin::BaseController
      load_and_authorize_resource class: Alchemy::Ingredient

      include CropAction

      helper "Alchemy::Admin::Ingredients"

      def edit
      end

      def update
        @ingredient.update(ingredient_params)
      end

      private

      def ingredient_params
        params[:ingredient]&.permit(@ingredient.class.stored_attributes[:data]) || {}
      end

      def load_croppable_resource
        @croppable_resource = @ingredient
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
alchemy_cms-6.1.10 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.5 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.4 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.3 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.9 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.2 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.8 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.7 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.1 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.0 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.0.pre.rc1 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.6 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.0.pre.c app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.0.pre.b app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.5 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.4 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.0.pre.a app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.3 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.2 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-6.1.1 app/controllers/alchemy/admin/ingredients_controller.rb