Suggestions?
Chris
Given all the other things we do with SQL like .find(:all,
:include=>...) you're going to be changing a lot more than that.
My advice would be to aim to be duck-type compatible rather than reuse
the implementation. Take a look at how we've implemented
ActiveResource.
--
Cheers
Koz
On Oct 26, 5:55 pm, "Michael Koziarski" <mich...@koziarski.com> wrote:
> > I'm struggling a bit with the best way to override the private create
> > and update methods. I have an adapter for a non sql backend and I
> > need to either override create and update, or alternatively maybe
> > override create_or_update and have it call replacements for create and
> > update. I would prefer the approach that modifies as little as
> > possible of activerecord.
>
> > Suggestions?
>
> Given all the other things we do with SQL like .find(:all,
> :include=>...) you're going to be changing a lot more than that.
Actually I want to keep most of the semantics of activerecord, I just
don't want to generate sql. With only overriding about 6 methods in
activerecord::base I have everything working except for some
associations. Right now what I'm doing is for our prototype, later
I'll probably write it clean from scratch as you suggest.
Chris
Chris,
Care to share some of what you have done?
Mike B.