Sha256: 9f8dd080ad4d66cc163377d4baea5f5127ad1f3afff830d81e01e61bd3b38ad0
Contents?: true
Size: 502 Bytes
Versions: 17
Compression:
Stored size: 502 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
17 entries across 17 versions & 1 rubygems