foodsoft/app/models/shared_supplier.rb
benni 0edd29dfd4 Merge branch 'master' into master-to-rails3
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
2012-12-14 18:10:46 +01:00

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