Sha256: 350421be7e413d9f38883292307dc03049fc71ece7b46dc22dd96d994c02603f
Contents?: true
Size: 753 Bytes
Versions: 15
Compression:
Stored size: 753 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 @language = Alchemy::Language.find_by(id: params[:language_id]) || Alchemy::Current.language 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
15 entries across 15 versions & 1 rubygems