CD-20071 define_method_attributes= should be a class method in Rails 4