Skip to content

Commit

Permalink
Model controller (CRUD)
Browse files Browse the repository at this point in the history
  • Loading branch information
levkk committed Oct 23, 2024
1 parent 4d284ac commit ee5e572
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions docs/docs/controllers/REST/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ Rwf comes with a REST [controller](../), which has the six aforementioned method

```rust
use rwf::prelude::*;
use rwf::controller::RestController;

#[derive(Default, macros::RestController)]
struct Users;
Expand Down Expand Up @@ -174,6 +173,5 @@ The `rest!` macro will ensure that all [six](#six-methods) REST-style paths are

## Learn more

- [Model controller](../model-controller)
- [Serialization](../serialization)
- [Model controller](model-controller.md)
- [examples/rest](https://github.com/levkk/rwf/tree/main/examples/rest)
2 changes: 1 addition & 1 deletion docs/docs/models/join-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Specifying the `belongs_to` relationship allows us to query the `Project` model
The `join::<Model>` method accepts a generic argument specifying which model we are joining to. If the association between `Project` and `User` doesn't
exist, the Rust compiler will return an error. This helps us avoid common errors by accidentally joining tables that don't have a relationship.

## Disambiguating fields
## Disambiguation fields

More often than not, two tables have columns with the same name. The most obvious example of this is the primary key, the `id` column by default, which
exists in all Rwf models. To specify which table & column a query is referring to, Rwf provides the ability to fully qualify the column with the table name:
Expand Down

0 comments on commit ee5e572

Please sign in to comment.