From 5d0c1814ad624090620e907012e0eaf353468202 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 21 Feb 2012 10:29:44 -0800 Subject: ruby 2.0 makes protected methods return false for respond_to, so pass true as the second param --- activemodel/lib/active_model/attribute_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 52f270ff33..97a83e58af 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -223,7 +223,7 @@ module ActiveModel unless instance_method_already_implemented?(method_name) generate_method = "define_method_#{matcher.method_missing_target}" - if respond_to?(generate_method) + if respond_to?(generate_method, true) send(generate_method, attr_name) else define_optimized_call generated_attribute_methods, method_name, matcher.method_missing_target, attr_name.to_s -- cgit v1.2.3