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