From 06d5e5fc97168265cb10c8de2b95f2f1f0e9dc8b Mon Sep 17 00:00:00 2001 From: Bradly Feeley Date: Sun, 26 May 2013 08:59:26 -0700 Subject: [PATCH] Let's just see if it responds to call instead of checking class. --- lib/simple_form/form_builder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb index e6b561f6..7e3b8255 100644 --- a/lib/simple_form/form_builder.rb +++ b/lib/simple_form/form_builder.rb @@ -183,7 +183,7 @@ module SimpleForm options[:as] ||= :select options[:collection] ||= options.fetch(:collection) { conditions = reflection.options[:conditions] - conditions = conditions.call if conditions.is_a?(Proc) + conditions = conditions.call if conditions.respond_to?(:call) reflection.klass.where(conditions).order(reflection.options[:order]).to_a }