-
Notifications
You must be signed in to change notification settings - Fork 32
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
Amend Sluggable module #974
Comments
I have a concern about this concern If I remember right, the reason why I used So, a |
After discussing with @amiedes I have updated the issue. |
Keep in mind when we do the issue that as it has an after_create, in the case, objects like PersonPost the method attributes_for_slug
It has an attribute that we haven't in the before_validation and we will have to omit the creation_at for the slug no? cc @ferblape |
Good point, let's us Time.now. |
Sluggable module works fine, but it can be improved a bit:
The callback that sets the slug should be
before_validation
. This way, it will work not only after creating but after updatingThe module should include two validations:
The text was updated successfully, but these errors were encountered: