Allowing SharedSuppliers to have multiple Suppliers. Should fix bennibu#107.
This commit is contained in:
parent
53518039f1
commit
c194d2545f
3 changed files with 4 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ class SharedArticle < ActiveRecord::Base
|
|||
|
||||
belongs_to :shared_supplier, :foreign_key => :supplier_id
|
||||
|
||||
def build_new_article
|
||||
shared_supplier.supplier.articles.build(
|
||||
def build_new_article(supplier)
|
||||
supplier.articles.build(
|
||||
:name => name,
|
||||
:unit => unit,
|
||||
:note => note,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue