From 382f91b1d63589a0bc764dbbffc188315ddbd443 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Wed, 5 Dec 2012 13:59:24 +0100 Subject: [PATCH] fix supplier_id mass assignment bug for list --- app/models/list.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/list.rb b/app/models/list.rb index d59786b3..3e576890 100644 --- a/app/models/list.rb +++ b/app/models/list.rb @@ -59,7 +59,8 @@ class List # Create, a list given a table and a user def self.from_table table, user return if user.has_active_list? - list = new table: table, supplier_id: table.supplier_id, section_id: table.section_id + list = new table: table, section_id: table.section_id + list.supplier_id = table.supplier_id list.add_user user list.save user.active_list_id = list.id