Work around removed attribute_methods_generated? in Rails 4.0.4