vestal_versions
vestal_versions copied to clipboard
Bug or Feature ? Don't version updated_at / updated_on and no short access method
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
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
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
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.
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?
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