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

Update product slug validation #1616

Merged
merged 1 commit into from
Dec 13, 2016
Merged

Conversation

fschwahn
Copy link
Contributor

@fschwahn fschwahn commented Nov 25, 2016

Replace the existing length validation with a presence validation, because the length validation could lead to errors with short product names (see #1608 for more information).

Should I add a model spec for creating products with short names?

One more thing I noticed is the uniqueness validation, I think it's unnecessary because that's essentially what friendly_id handles. At least the allow_blank: true is unnecessary because we validate the length / presence, so this can never happen.

Replace the existing length validation with a presence validation, because the length validation could lead to errors with short product names (see solidusio#1608 for more information).
Copy link
Contributor

@cbrunsdon cbrunsdon left a comment

Choose a reason for hiding this comment

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

Good by me, thanks.

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

That's good. No need for additional tests. Thanks

@jhawthorn jhawthorn merged commit df7be82 into solidusio:master Dec 13, 2016
jhawthorn added a commit that referenced this pull request Dec 13, 2016
Update product slug validation
@jhawthorn
Copy link
Contributor

Thanks @fschwahn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants