From ee1874a15fef76a11e34081bc9715bb84fd02d1f Mon Sep 17 00:00:00 2001 From: wvengen Date: Wed, 10 Sep 2014 14:41:35 +0200 Subject: [PATCH] fix upload error --- app/controllers/articles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index e0c32ded..904ce843 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -150,7 +150,7 @@ class ArticlesController < ApplicationController # fallback to Others category category = (ArticleCategory.find_match(row[:category]) or no_category) # creates a new article and price - article = Article.new( :name => row[:name], + article = @supplier.articles.build(:name => row[:name], :note => row[:note], :manufacturer => row[:manufacturer], :origin => row[:origin],