Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6539443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:51:36+00:00 2026-05-25T10:51:36+00:00

I will start a system and we have chosed rails because it covers all

  • 0

I will start a system and we have chosed rails because it covers all our needs.

We need consistency on database updates in some point of the system and I remember that I found in some official documentation that rails can check for the versions of the records automatically, however I have googled a lot and I cannot find those pages again.

The problem is the following:

  • Suppose that there exists a record in a table of the database. Let’s say, an “account”.
  • Suppose that a user named Bob finds that record and starts editing it. Let’s say that the user is changing its name from “Incomings” to “Sales”.
  • Suppose that at the time Bob is editing the record, another user named Susan find exactly the same record and starts editing it. Let’s say that Susan wants to change the name of the account from “Incomings” to “Service fees”.
  • Then, Bob saves his changes.
  • After Bob saves his changes, Susan tries to save her changes.

At this point, the system should inform to Susan that another user has changed the record and her changes cannot be saved.

I can do this validation manually, but I remember that this can be done by Rails automatically. I remember that the only requeriment on the tables of the database where is required this validation is to add a “version” column and Rails will take care of this. Really I don’t remember if the column must be called “version” or something else, but the fact is that only a columns enables this feature.

The problem is that I cannot find that documentation anymore. If anyone could provide me the link to that documentation I will be thankful, because the requeriment of the “version” column is all what I remember and I wan’t to know what other things I must take care of.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:51:36+00:00Added an answer on May 25, 2026 at 10:51 am

    Well, I have found the answer to my own question.

    The documentation is on the API and can be found here:

    http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html

    The documentation is very short! And I was wrong on the name of the required column. The correct name of the column is ‘lock_version’.

    Thank you to all who, at least, read my question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I start build a system with distributed architecture by all applications will communication by
How can I start a job on a *nix system that will not exit
As we all know Java program will start executing from the public static void
I have a .Net console App which using a scheduled event will start, call
I have an asp.net page that calls a dll that will start a long
We have an ASP.Net MVC project that will start with a single web server
I have a DIV that contains user-generated contents. These contents may and will start
We have Oracle 11g base HR System. Now our requirement is to make some
I have multi (2 and more) display(screen) system and I need to define on
I have a one-time process (hashing all our user passwords) written using datasets. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.