Skip to content

Commit

Permalink
Clarify defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcsmith committed Aug 21, 2019
1 parent 6a53b69 commit 6045344
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/actions/guides/database/models.cr
Expand Up @@ -66,6 +66,8 @@ class Guides::Database::Models < GuideAction
* `id` - Your primary key column. Default `Int64`
* `created_at` - default `Time` type.
* `updated_at` - default `Time` type.
### Changing the default columns
To change your defaults, define a macro called `default_columns` in your `BaseModel`.
Expand All @@ -81,7 +83,7 @@ class Guides::Database::Models < GuideAction
end
```
If you don't need the default columns in your model , call the `skip_default_columns` macro
If you don't need the default columns for a specific model, call the `skip_default_columns` macro
at the top of the model class.
```crystal
Expand Down

0 comments on commit 6045344

Please sign in to comment.