I think there is something wrong with method_defined?
in Rails. It may be inconsistent or something, so if you use Rails, it's better to use something from attribute_method?(attribute)
.
"testing for method_defined? on ActiveRecord classes doesn't work until an instantiation" is a question about the inconsistency.