fix supplier_id mass assignment bug for list

This commit is contained in:
2012-12-05 13:59:24 +01:00
parent c438ebb2db
commit 382f91b1d6
+2 -1
View File
@@ -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