ruby - Handle version conflict when multiple concurrent editor on the same model rails -


Multiple concurrent editors on the same model rail when the version can handle conflict? For example, edit a click on the user controller and start editing the content user b click on the post controller and editing the title user b and clicking on saving user A and saving the amendments made by user b And click to override

Is it to stop? I'm thinking to check it by using the updated_at field that the version edited is final to any plugin or gem to do this ??

I do not know any plugins or gems, keep this in mind (ie, from models to ideas To handle everything), and plugins are searched for no avail at gemcutter.org and agilewebdevelopment.com in a nutshell.

Another upcoming program / package is well managed by Google Wave

But if this is not an option (as it will almost certainly do), this is a quick and There is a simple idea that you can find there:

  1. Add a field for the 'edit_at' view called "Request_at"

  2. To get 'updates', check that the "Requested" form field value is at least "stored" of the stored object Ed_at "value.

  3. If this is the case, then possibly send feedback on the warning browser about the possible conflict of the user. You can also display the difference between the user's submitted data and the current state of the stored object. For this 'inter-display' I recommend that diff-lcs library is available on gemcutter:

  4. Modify the user after the ideas and subimssion in it, rinse and repeat ( Or give alternatives to them to override any existing changes, even if someone else has edited the text.)

In one of the following answers to the version of your Active_Record model Uses mentioned, and its A. You can try ActAsAudited (at least this is my favorite) ... but I'm not sure that you were able to describe the problem.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -