You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add next feature? I set time since last updated time when last version will be overwrite without creating a new version. When time is out: new version will be created like current behavior. It will be good for autosaving.
The text was updated successfully, but these errors were encountered:
Hi @bragovo! I am afraid, I don't understand clearly, what you want to achieve. Can you please provide a snippet with desired API usage example and comments about expected results?
# Something like -- rails g logidze:model Post --cooldown=5.minutes
# Find old yesterday record
post = Post.find(27) # v1
# Create new version at 13:01
post.update(title: 'title 1') # v2
# Rewrite v2 at 13:02
post.update(title: 'title 2') #v2
# Rewrite v2 at 13:03
post.update(title: 'title 3') #v2
# Create new version at 13:09
post.update(title: 'title 4') #v3
It will be similar to:
if post.updated_at + 5.minutes < Time.now
Post.update(title: 'new title')
else
Post.without_logging { Post.update(title: 'new title') }
end
Is it possible to add next feature? I set time since last updated time when last version will be overwrite without creating a new version. When time is out: new version will be created like current behavior. It will be good for autosaving.
The text was updated successfully, but these errors were encountered: