Sha256: 2f4691269d0ffa1f4d797c0c147d27a68a5dd872c7e80e3bfd0a56e6ca3f14c5
Contents?: true
Size: 467 Bytes
Versions: 52
Compression:
Stored size: 467 Bytes
Contents
module ActiveRecord class Fixture def find if model_class # CPK # model_class.find(fixture[model_class.primary_key]) ids = self.ids(model_class.primary_key) model_class.find(ids) 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
52 entries across 52 versions & 1 rubygems