diff --git a/lib/enumerated_attribute/integrations/active_record.rb b/lib/enumerated_attribute/integrations/active_record.rb index f4daa6d..04399f4 100644 --- a/lib/enumerated_attribute/integrations/active_record.rb +++ b/lib/enumerated_attribute/integrations/active_record.rb @@ -103,7 +103,7 @@ def new(*args, &block) result end end - unless private_method_defined?(:method_missing_without_enumerated_attribute) + unless method_defined?(:method_missing_without_enumerated_attribute) || private_method_defined?(:method_missing_without_enumerated_attribute) define_chained_method(:method_missing, :enumerated_attribute) do |method_id, *arguments| arguments = arguments.map{|arg| arg.is_a?(Symbol) ? arg.to_s : arg } method_missing_without_enumerated_attribute(method_id, *arguments)