We are constructing at rails GUI using two differant databases, and this
seems to work out nicely using a “establish_connection” per model, where
each model enherit directly from ActiveRecord::Base.
But ! I like to use a model where we can inherit from one parent class
that handles the connection exactly as descripted in this document :
The only problem is that my database (postgres) seems to be asked to
find this parent class, but this should not have happend !
My Models looks like this :
class SafeRecord < ActiveRecord::Base
class Event < SafeRecord
– Taken from script/console when doing a “e = Event.new”
ActiveRecord::StatementInvalid: PGError: ERROR: relation “safe_record”
does not exist
Why are rails looking for “safe_record” ?