Is it possible to create an activerecord class from a custom sql query or view ? It doesn't need to be editable. example:
class c
select a.*, b.* from a, b where a.code = b.code
end
This example is a join where all the fields from both tables are resent, the one to one joins in activerecord only present fields from one table, the others are accessible through a.bs.fieldname. I would like them aal to be fields on the same level, thus in one class.
so that a.code, a.name and b.code, b.extra can be accessed as c.code, c.name, c.extra