From a71fbeb6259df19f169fec879e003a560947b049 Mon Sep 17 00:00:00 2001 From: Paul Gideon Dann Date: Wed, 11 Aug 2010 11:41:39 +0100 Subject: [PATCH] Support Machinist 1 as well as Machinist 2 --- lib/pickle/adapter.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pickle/adapter.rb b/lib/pickle/adapter.rb index a9b8b3bd..7b3b7de0 100644 --- a/lib/pickle/adapter.rb +++ b/lib/pickle/adapter.rb @@ -90,7 +90,11 @@ def initialize(klass, blueprint) end def create(attrs = {}) - @klass.send(:make!, @blueprint, attrs) + if @klass.respond_to?('make!') + @klass.send(:make!, @blueprint, attrs) + else + @klass.send(:make, @blueprint, attrs) + end end end