diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb index 60cf1d844..2e428e81e 100644 --- a/app/controllers/products_controller.rb +++ b/app/controllers/products_controller.rb @@ -27,7 +27,7 @@ class ProductsController < ApplicationController redirect_to platform_product_path(@platform, @product) else flash[:error] = t('flash.product.save_error') - flash[:warning] = @platform.errors.full_messages.join('. ') + flash[:warning] = @product.errors.full_messages.join('. ') render :action => :new end end @@ -38,7 +38,7 @@ class ProductsController < ApplicationController redirect_to platform_product_path(@platform, @product) else flash[:error] = t('flash.product.save_error') - flash[:warning] = @platform.errors.full_messages.join('. ') + flash[:warning] = @product.errors.full_messages.join('. ') render :action => "edit" end end