Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

make created_at and updated_at override-able

#24

Currently CouchRest::Model writes created_at and updated_at into objects it saves regardless of whether the fields are pre-existing.

I propose allowing created_at to be overridden if it's already present, as that obviously means it's been manually set.

Allowing override of updated_at is more complex, as it is presumed to preexist when an existing record is re-saved, and there's no way for CR to know if the updated_at field has been manually changed since it was loaded from DB or not. It's probably too annoying/complex to implement some kind of flag/which fields are dirty system so maybe ignore this for now unless dev has different ambitions. Obviously, however, if it's a new record it should also respect the override on created_at if present.

What do you think?

Reported by hkstar · November 22nd, 2008 @ 03:30 AM

State: new
Milestone: none
Assigned to: J. Chris A. J. Chris A.

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.