Q:

Active Record in Rails not saving update

I have a module that is being inherited inside an active record.
In that module
I'm calling a function which gets an id from an external source and then updates the record 
I get update result = true but the record will not save the update
# This is shared between multiple instances of classes 
module External
  def get_external_id 
     external_client_id =  ExternalClient::get_id(self)
     # it used to be 
     # self.update_attributes(external_client_id:external_client_id,  external_id_updated_date: Time.now)
     self.external_client_id = external_client_id
     self.external_id_updated_date = Time.now
     self.save
  end
end

class InfomrationForm < ActiveRecord::Base
  include External

end

when I try to use 
  self.external_client_id
I get null 
when I should get a random UUID from external service.
I have inspected the whole function 
The service returns a proper id and I can log it
the save returns true and I can log that but when I try to use the
The problem was that one of my validation was failing silently without raising an issue.
I had to comment all validations and then return them one by one to figure out which one was failing.

A:

Validation was failing silently, even though it should have been throwing an error.
Had to comment out all validations and return them one by one. 
It was in a validation that had 
if: Proc.new {} block
I think the issue has to do with me calling a function in side the Proc.new 
and that function calls an inherited function that returns self.relation 
once that got fixed saving works fine 

