Replies: 2 comments 1 reply
-
Hi @dyeje! Have you tried wrapping the |
Beta Was this translation helpful? Give feedback.
-
I've implemented similar in the past, but instead of using real records I used FactoryBot's |
Beta Was this translation helpful? Give feedback.
-
Feature request
Some mechanism similar to RSpec
use_transactional_fixtures
for component previews.Motivation
We often pass active record objects into our components. 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. It'd be nice if we could generate the markup and then throw away the records similar to how a component spec works.
Beta Was this translation helpful? Give feedback.
All reactions