Sha256: 3dbd353d50a16f24f655675d0763f10bb987d9f3c59d26a10b5c05b7ffaba269
Contents?: true
Size: 591 Bytes
Versions: 19
Compression:
Stored size: 591 Bytes
Contents
module ActiveRecord class Fixture def find if model_class # CPK # model_class.unscoped do # model_class.find(fixture[model_class.primary_key]) # end model_class.unscoped do ids = self.ids(model_class.primary_key) model_class.find(ids) end else raise FixtureClassNotFound, "No class attached to find." end end def ids(key) if key.is_a? Array key.map {|a_key| fixture[a_key.to_s] } else fixture[key] end end end end
Version data entries
19 entries across 19 versions & 1 rubygems