Sha256: b038f21ca76fe44053075a83761c80633bc7508814883a82ab6256a670cd95b5
Contents?: true
Size: 569 Bytes
Versions: 10
Compression:
Stored size: 569 Bytes
Contents
module Ixtlan module OptimisticPersistenceModule def stale? if(!new? && prop = properties[:updated_at] && dirty?) updated_at = original_attributes[prop] || properties[:updated_at].get!(self) qu = {} c = model.key_conditions(repository, key) c.each {|p,v| qu[p.name] = v} s = self.model.first(qu) if s.nil? false else # use to_s to get it to work in both MRI and JRuby s.updated_at.to_s != updated_at.to_s end else false end end end end
Version data entries
10 entries across 10 versions & 1 rubygems