From 3c1b9cbf1030c80f1f42b359e7ecb66dff21c9ba Mon Sep 17 00:00:00 2001 From: Wessel van Heerde Date: Wed, 8 Feb 2017 09:55:48 +0100 Subject: [PATCH] Fix Rails 3 compatibility in issue #147 --- lib/phony_rails.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/phony_rails.rb b/lib/phony_rails.rb index 5d7bce1..53d5fb7 100644 --- a/lib/phony_rails.rb +++ b/lib/phony_rails.rb @@ -199,7 +199,7 @@ def phony_normalized_method(*attributes) # check whether it is ActiveRecord or Mongoid being used ActiveRecord::Base.send :include, PhonyRails::Extension if defined?(ActiveRecord) -ActiveModel::Model.send :include, PhonyRails::Extension if defined?(ActiveModel) +ActiveModel::Model.send :include, PhonyRails::Extension if defined?(ActiveModel::Model) if defined?(Mongoid) module Mongoid::Phony