Sha256: eaca8f9a24f64a8d1b232dc4dcf11fdb5a92be311a591b5a2c2dcada4e797f5b
Contents?: true
Size: 537 Bytes
Versions: 8
Compression:
Stored size: 537 Bytes
Contents
module Ixtlan module Core module OptimisticActiveRecord def self.included(base) base.class_eval do def self.optimistic_find(updated_at, *args) p updated_at updated_at = new(:updated_at => updated_at).updated_at # TODO make it work with different PKs r = first(:conditions => ["id = ? and updated_at = ?", args[0], updated_at]) p args[0] p updated_at p r r end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems