Merge remote-tracking branch 'origin/rails3'
Conflicts: Gemfile Gemfile.lock
This commit is contained in:
commit
7a63394dac
6 changed files with 22 additions and 10 deletions
|
|
@ -7,6 +7,12 @@ class SharedSupplier < ActiveRecord::Base
|
|||
|
||||
has_one :supplier
|
||||
has_many :shared_articles, :foreign_key => :supplier_id
|
||||
|
||||
|
||||
# These set of attributes are used to autofill attributes of new supplier,
|
||||
# when created by import from shared supplier feature.
|
||||
def autofill_attributes
|
||||
whitelist = %w(name address phone fax email url delivery_days note)
|
||||
attributes.select { |k,_v| whitelist.include?(k) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue