Sha256: 81f97e4d55d62e439bcb2725437f7e0f4cd8b3fe2d51633112055842b57fab44
Contents?: true
Size: 703 Bytes
Versions: 5
Compression:
Stored size: 703 Bytes
Contents
module Spree module Admin module ProductPropertiesControllerDecorator def translate product_property = Spree::ProductProperty.find(params[:id]) product_property.update update_product_property_attribute redirect_to spree.admin_product_product_properties_path(product_property.product) end private def update_product_property_attribute params.require(:product_property).permit(permitted_params) end def permitted_params [translations_attributes: [:id, :locale, :value]] end end end end SpreeMobility.prepend_once(::Spree::Admin::ProductPropertiesController, Spree::Admin::ProductPropertiesControllerDecorator)
Version data entries
5 entries across 5 versions & 1 rubygems