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 fake_data to create test Categories and pass those in to new Tags #916

Merged
merged 1 commit into from Aug 27, 2020

Conversation

threeplanetssoftware
Copy link
Contributor

This fixes #914 by creating test Categories during rails fake_data and pulling those randomly in to the creation of new Tags.

Note: This does not use find_and_create_by! for Tags since that could attempt to create another tag with the same name if the random Category is different. Instead it checks for an existing tag (regardless of Category) and, if that is not found, then tries to create a new tag.

This also updates rails fake_data to use the newer Faker::Lorem syntax, specifying the parameter name in .sentences() and .paragraphs(). This is a follow-on from the work in #881.

new tags when created. Does not use find_and_create_by! for new
Tags since that could attempt to create another tag with the same
name if the random Category is different.

Update fake_data to use the newer Faker::Lorem syntax, specifying
the parameter name in .sentences() and .paragraphs().
@pushcx
Copy link
Member

pushcx commented Aug 27, 2020

Thanks for fixing this, and even updating our deprecated style.

@threeplanetssoftware threeplanetssoftware deleted the bug-914-fix-fake-data branch August 29, 2020 01:36
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.

Rake fake_data errors out due to not adding categories to the creation of tags.
2 participants