Forum: Ruby on Rails Associating ActiveRecord and non-ActiveRecord objects

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C608d449f87ba87dd4a3f653afb304c1?d=identicon&s=25 Evan (Guest)
on 2009-02-28 03:28
(Received via mailing list)
Is it possible to define a model that is not backed by a database
table and still relate other models to it? Will relations between
instances of these models persist?

For instance, say I have a Cat model that does not inherit from
ActiveRecord and an Owner model that does. Can I assign a particular
cat to an owner? The next time I load the app will that pair be
remembered?
A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-02-28 03:37
(Received via mailing list)
No.

Unless you roll your own solution or persist the cat at the database
in a way or another.

-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)
This topic is locked and can not be replied to.