Class: TestSeeds::SeedFixture
- Inherits:
-
Object
- Object
- TestSeeds::SeedFixture
- Defined in:
- lib/test_seeds.rb
Instance Method Summary collapse
-
#find ⇒ Object
Override find to call find with exclusive scope.
Instance Method Details
#find ⇒ Object
Override find to call find with exclusive scope. Shouldn’t fixtures do that already?
10 11 12 13 14 15 16 17 18 |
# File 'lib/test_seeds.rb', line 10 def find if model_class model_class.send(:with_exclusive_scope) do model_class.find(@fixture[model_class.primary_key]) end else raise FixtureClassNotFound, "No class attached to find." end end |