Missing LightningModule datamodule reference
🐛 Bug
This docs snippet does not work:
https://pytorch-lightning.readthedocs.io/en/latest/common/lightning_module.html#datamodule
To Reproduce
def test_bug(tmpdir):
    class TestModel(BoringModel):
        def configure_optimizers(self):
            # works
            len(self.trainer.datamodule.train_dataloader())
            # does not
            len(self.datamodule.train_dataloader())
            
            return super().configure_optimizers()

    dm = BoringDataModule()
    trainer = Trainer(default_root_dir=tmpdir, fast_dev_run=True)
    trainer.fit(TestModel(), datamodule=dm)
line 128, in configure_optimizers
    num_training_samples = len(self.datamodule.train_dataloader())
AttributeError: 'NoneType' object has no attribute 'train_dataloader'
Expected behavior
self.datamodule works
Alternatives
Update docs
Environment
master
Additional context
Reported by Brian Staber in Slack