Add API for attributes_for