Sha256: baa72abc52d06403bc2a813eb0f20663c71cc7827865e6d00b4f76c6f82b5faf

Contents?: true

Size: 642 Bytes

Versions: 28

Compression:

Stored size: 642 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]) ||
          ActionController::Parameters.new
      end

      def load_croppable_resource
        @croppable_resource = @ingredient
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
alchemy_cms-7.1.13 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.16 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.12 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.15 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.11 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.10 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.9 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.14 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.13 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.8 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.7 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.12 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.11 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.6 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.5 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.10 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.4 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.0.9 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.3 app/controllers/alchemy/admin/ingredients_controller.rb
alchemy_cms-7.1.2 app/controllers/alchemy/admin/ingredients_controller.rb