Sha256: 60efbeaafffcf469c2590b25e34efa6f8283eb788bc526eab9492032100ce1eb

Contents?: true

Size: 401 Bytes

Versions: 8

Compression:

Stored size: 401 Bytes

Contents

module Ixtlan
  module Core
    module OptimisticDataMapper

      def self.included(base)
        base.class_eval do
          def optimistic_find(updated_at, *args)
            updated_at = new(:updated_at => updated_at).updated_at
            # TODO make it work with different PKs
            first(:id => args[0], :updated_at => updated_at])
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ixtlan-core-0.8.0 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.7.5 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.7.4 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.7.3 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.7.2 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.7.1 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.7.0 lib/ixtlan/core/optimistic_data_mapper.rb~
ixtlan-core-0.6.1 lib/ixtlan/core/optimistic_data_mapper.rb~