Devise - login from two model
I have two user models, first is from remote database as legacy and for internal company purposes. (Employee logins). Second is our project for public registration and sign in but I want one login form. I have searching long time, but some solutions are confusing for me. First legacy looks like (only for reading and authentication): class CrmUser < ActiveRecord::Base require Rails.root.join('lib', 'devise', 'encryptors', 'sha1') # Include default devise modules. Others available are: # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable, :rememberable, and :omniauthable