diff --git a/UPGRADE b/UPGRADE index f1bc767..5149eab 100644 --- a/UPGRADE +++ b/UPGRADE @@ -43,3 +43,7 @@ I changed the tests to make the test usefull +6 - I changed the way as the product is created on ManageProducts controller. I removed the line: + @product.build_image unless @product.image + +because the image was never saved. It don't have valid values to be saved. diff --git a/app/controllers/my_profile/manage_products_controller.rb b/app/controllers/my_profile/manage_products_controller.rb index 32938d1..8671569 100644 --- a/app/controllers/my_profile/manage_products_controller.rb +++ b/app/controllers/my_profile/manage_products_controller.rb @@ -26,7 +26,6 @@ class ManageProductsController < ApplicationController @object = Product.new @categories = @current_category.nil? ? ProductCategory.top_level_for(environment) : @current_category.children @product = @profile.products.build(params[:product]) - @product.build_image unless @product.image if request.post? if @product.save flash[:notice] = _('Product succesfully created') -- libgit2 0.21.2