I have two models that are not related (in the sense of db), but have some common columns (Name, Email, etc.).
Class Account < ActiveRecord::Base
end
Class LegacyAccount < ActiveRecord::Base
end
For various reasons, I cannot combine them into one model or make an STI. But I would like for a simple view to display all the records of both models in a good table (possibly sorted by a common field of type "name").
Can I search / query from both models? Or can I make two finds and combine the resulting arrays so that they are sorted? Can I use some intermediate model to combine both?
source
share