Ruby on Rails Wednesday, March 30, 2011

On 03/30/2011 11:49 AM, Xavier Noria wrote:
> I don't see any data loss necessarily, that depends on your
> application.

That's a given.

>If W says all those fields are fine as they are, I trust
> W. I trust the last one. How do you know W is wrong a priori?

You can't trust W, he never saw the changes the other guy made because
he was editing an old copy. W update should fail because the record was
changed since he last viewed it and he should be shown the current data
and told to attempt his change again on the current data. If you're
really fancy, you attempt to merge for him and ask for approval.

> The order in which the application sent the forms may be irrelevant
> (again, I am using "may"). If W says the state is T, let it be T. He
> was in particular saying that it is not S (for S != T if you allow me
> the detail :).

State is rarely a single field, T may have 20 fields where U updated 15
of them and W updated just 1 and you're saying it's the perfect default
behavior to lose all of U's hard work because W made one change to an
unrelated field. That's just crazy *as a default* unless you've
determined up front that data loss doesn't matter. You *will lose data*.

> It is your application who defines what's a reasonable behavior.

Again, that's a given.

--
Ramon Leon

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment