12 lines
330 B
Ruby
12 lines
330 B
Ruby
class SharedSupplier < ActiveRecord::Base
|
|
|
|
# connect to database from sharedLists-Application
|
|
SharedSupplier.establish_connection(FoodsoftConfig[:shared_lists])
|
|
# set correct table_name in external DB
|
|
self.table_name = 'suppliers'
|
|
|
|
has_many :suppliers
|
|
has_many :shared_articles, :foreign_key => :supplier_id
|
|
|
|
end
|
|
|