megas
megas

Reputation: 21791

Active Record without database

My application doesn't need any database backend because it's kinda proxy server between client and another servers.

But I found that it would be nice to have all Active Record facilities (validation, associations and etc) in my project.

How to setup Active Record to not use database at all?

Ryan Bates in 219 cast "The Active Model" described only validation part but I need association facility.

Upvotes: 9

Views: 8832

Answers (2)

Boti
Boti

Reputation: 3435

These two gems could be what you want:

activemodel-associations

activemodel

Upvotes: 4

Jiří Pospíšil
Jiří Pospíšil

Reputation: 14401

Take a look at ActiveModel. That's what AR uses under the hood.

Upvotes: 4

Related Questions