Sha256: df18061b4a2ea78e03d7bdd7c9768228f4d4c1e106f3a09c1cd777b53db09d5d
Contents?: true
Size: 481 Bytes
Versions: 16
Compression:
Stored size: 481 Bytes
Contents
module ActiveRecord class Fixture def find raise FixtureClassNotFound, "No class attached to find." unless model_class model_class.unscoped do # CPK #model_class.find(fixture[model_class.primary_key]) ids = self.ids(model_class.primary_key) model_class.find(ids) 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
16 entries across 16 versions & 1 rubygems