Skip to content
Discussion options

You must be logged in to vote

Currently, we fetch records and hope they have the properties we need. What would be great is if we could use factory_bot or similar to create the exact records we need for a preview. We could do that currently, but it would pollute our local database each time we view the preview.

I've implemented similar in the past, but instead of using real records I used FactoryBot's build and build_stubbed functionality to avoid having to deal with creating real records in the environments you're running previews in.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@dyeje
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by joelhawksley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1587 on November 22, 2022 21:42.