Skip to content

Mechanism for Using Emepheral Database Records in Previews #1587

@dyeje

Description

@dyeje

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions