For the time being, using what you mentioned (via Rails' built-in 
locking - lock_version is the column name IIRC) would probably be best.

Sean

Daniel Sheppard wrote:
> Just had my first instance of conflicting updates - I edited a page while 
> somebody else was editing it too without realising it -
> luckily in this instance we were both trying to do the same thing, but this 
> could lead to data loss without warning.
>
> Time for some big red flashing warning lights.
>
> I'm going to add a hidden field to the Page editing page containing the last 
> updated value of the page - that will be sent back to
> the server and the validation should check that the updated_at field in the 
> database matches - if not, a bit red error saying
> something like
>
> "This page has been modified since you last loaded it. The last user to edit 
> this page was <username of culprit>. If you continue
> saving this page their changes may be lost". 
>
> There will then by a checkbox with that option saying something like 'ignore 
> <usernames>'s changes and save my changes anyway'
> allowing you to continue with your save if that's what is appropriate - that 
> will set a second field that will tell the object to
> ignore that validation. I'm not 100% sure of doing this - you could always 
> copy/paste and just do it again, but I think this way is
> probably nicer.
>
> Anybody have any objections to handling conflicts in this way? Or better 
> ideas (that DON'T involve writing making a version control
> system for pages)? I'll probably check in a change tomorrow if there isn't 
> any.
>
> Dan.
>
>
>
>
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>   

_______________________________________________
Radiant mailing list
Post:   Radiant@lists.radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to