vestal_versions icon indicating copy to clipboard operation
vestal_versions copied to clipboard

Bug or Feature ? Don't version updated_at / updated_on and no short access method

Open ZenCocoon opened this issue 15 years ago • 5 comments
trafficstars

Hi,

First of all, well done for this great gem, really useful.

Any reason why you choosed to don't implement a quick access method updated_at / updated_on to return object.versions.at(version_number).created_at ?

I feel that manually calling object.versions.at(version_number).created_at is pretty over complicate comparing a natural call to object.updated_at / updated_on as follow:

object.updated_at object.revert_to(version_number) object.updated_at

Warm regards,

Sébastien Grosjean - ZenCocoon

ZenCocoon avatar Dec 17 '09 00:12 ZenCocoon

Sébastien,

Thanks for the suggestion. I'll keep this in mind. I do like the idea, but am hesitant to use the updated_at method to access it. I'll consider some alternate naming and get back to this. Thanks,

Steve

laserlemon avatar Jan 03 '10 01:01 laserlemon

Hi Steve,

Glad to ear you like the idea. "version_updated_at" could be an alternative.

Warm regards and Happy New Year,

Sébastien Grosjean - ZenCocoon

ZenCocoon avatar Jan 05 '10 16:01 ZenCocoon

I'm importing legacy data and need to set the updated_at value for a version to a specific date so it would be great if there was some way of overriding the automatically generated timestamps.

schlick avatar Feb 22 '10 02:02 schlick

I've had a go at implementing this feature although primarily I was after a way of overriding the actual timestamps (as I mentioned above) but I also put in a method called version_created_at. Would it be useful to have a version_updated_at method as well?

schlick avatar Feb 28 '10 10:02 schlick

Hi. Nice if update_at could also be set in the revert but maybe there is something here I miss. Today there is no straightforward way enumerating all versions and displaying editor and update_at (a common request) since there is no v1 entry in the versions assoc. /Niclas

niclas avatar Mar 26 '10 07:03 niclas