Adjust to new way define_attribute_methods is called in Rails 4