0edd29dfd4
Conflicts: Gemfile README_DEVEL app/controllers/articles_controller.rb app/controllers/orders_controller.rb app/controllers/tasks_controller.rb app/models/task.rb app/views/articles/_import_search_results.haml app/views/articles/index.haml app/views/messages/new.haml app/views/ordering/_order_head.haml app/views/ordering/my_order_result.haml app/views/orders/show.haml app/views/stockit/new.html.haml db/schema.rb
12 lines
328 B
Ruby
12 lines
328 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_one :supplier
|
|
has_many :shared_articles, :foreign_key => :supplier_id
|
|
|
|
end
|
|
|