The application I'm currently working on requires me to access multiple data sources from within a single model. I want to know what's the best way to accomplish it. Can I do something like the following?
class SomeModel < ActiveRecord::Base
  establish_connection :data_source1
  # Get some data from data_source1 and store in a instance variable
  establish_connection :data_source2
  # Get some data from data_source2 and store in a instance variable
end
Appreciate for your suggestions.
 
     
    