Today I abused ActiveRecord badly, but to no avail, alas. I tried to 
make it accept a habtm association to a class that wasn't derived from 
ActiveRecord::Base. I like to think that I got pretty far stubbing out 
all kinds of methods in my almost-PORO, when I got bitten by an 
unrelated bug[*].

But why would anyone want to do such a hideous thing? Easy: I have user 
and group information available through an LDAP server and I don't want 
to mirror the data in tables just so my app can access them.

My problem is in in no way specific to LDAP. It applies to arbitrary 
resources. So -- wouldn't it be beyond nice to have associations 
between ActiveRecord, ActiveResource, and ActiveLDAP?

I don't think associations to plain, unadorned objects can work, but a 
contract requiring to implement CRUD + find methods in "associable" 
classes and a mixin on top of that can probably handle the task.

What do you think?

Michael


[*] http://dev.rubyonrails.org/ticket/5548

-- 
Michael Schuerig
mailto:[EMAIL PROTECTED]
http://www.schuerig.de/michael/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to