From 709eb44ccb8d08ad7f26cdac2932eadc7ccd48e7 Mon Sep 17 00:00:00 2001 From: Melody Horn / boringcactus Date: Fri, 18 Jun 2021 10:12:16 -0600 Subject: make model metadata available in AppConfig --- examples/tutorial01/polls/mod.rs | 2 ++ examples/tutorial01/polls/models.rs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'examples/tutorial01/polls') diff --git a/examples/tutorial01/polls/mod.rs b/examples/tutorial01/polls/mod.rs index 0b039d9..d15a1ca 100644 --- a/examples/tutorial01/polls/mod.rs +++ b/examples/tutorial01/polls/mod.rs @@ -7,7 +7,9 @@ pub mod views; pub use urls::urls; +#[allow(dead_code)] pub const APP: AppConfig = AppConfig { name: module_path!(), + models: models::ALL, migrations: migrations::migrations, }; diff --git a/examples/tutorial01/polls/models.rs b/examples/tutorial01/polls/models.rs index 82aa7fd..bc1cd9b 100644 --- a/examples/tutorial01/polls/models.rs +++ b/examples/tutorial01/polls/models.rs @@ -1,3 +1,6 @@ -use tosin::db::models::{Model, Id}; +#[allow(unused_imports)] +use tosin::db::models::{Model, Id, gather}; // TODO define models + +gather!(); -- cgit v1.2.3