I would do  model.index.name  rather than table_name