We have a server setup in which the rails server writes to the same database as the Java enterprise server. We have an api for a corporate server implemented on a rails server that will create a user. It looks like this:
user = User.new
user.name = "Test"
user.save()
The problem that we are facing now is that when a user creates a request, returns the user ID to the corporate server, it is sometimes not found by the enterprise server in the database.
When does ActiveRecord insert a new object into the database? Is there a way to ensure that when saving it returns that the database insert statement was executed?
Rail version - 2.3.10
source
share