Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to automatically generate slug from another field #258

Merged
merged 12 commits into from
Sep 18, 2024

Conversation

treagod
Copy link
Contributor

@treagod treagod commented Aug 8, 2024

With this change a slug field accepts a slugify parameter, which references another field of the same model. When set the slug field we be automatically set to a slugified version of the referenced field.

#155

@treagod treagod requested a review from ellmetha August 8, 2024 15:02
src/marten/db/field/slug.cr Outdated Show resolved Hide resolved
src/marten/db/field/slug.cr Outdated Show resolved Hide resolved
src/marten/db/field/slug.cr Outdated Show resolved Hide resolved
src/marten/db/field/slug.cr Outdated Show resolved Hide resolved
@treagod treagod requested a review from ellmetha August 21, 2024 08:08
src/marten/core/sluggable.cr Outdated Show resolved Hide resolved
src/marten/core/sluggable.cr Outdated Show resolved Hide resolved
src/marten/core/sluggable.cr Outdated Show resolved Hide resolved
src/marten/db/field/slug.cr Outdated Show resolved Hide resolved
src/marten/core/sluggable.cr Outdated Show resolved Hide resolved
src/marten/db/field/slug.cr Show resolved Hide resolved
@treagod treagod force-pushed the slugify-field-option branch 2 times, most recently from ac1427b to 0c99d3e Compare September 5, 2024 07:35
Copy link
Member

@ellmetha ellmetha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ellmetha ellmetha merged commit 661c7ce into main Sep 18, 2024
70 checks passed
@ellmetha ellmetha deleted the slugify-field-option branch September 18, 2024 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants