I'm using rails 4.1.5 How to JOIN tables of two different databases in Ruby on Rails.
I have a Model(Users) in DB1 and another model(Assets) in DB2. Association between Users and Assets is: User has_many assets and Asset belongs_to User.
Query: I want to Join these two tables, right now I'm using raw sql query in my application. "SELECT * FROM DB1.users user JOIN DB2.assets asset ON asset.user_id = user.id"
Is there any better solution in RoR?