palkan / view_component-contrib

A collection of extension and developer tools for ViewComponent
MIT License
369 stars 22 forks source link

Can't override default template path #11

Closed dhnaranjo closed 2 years ago

dhnaranjo commented 2 years ago

What did you do?

Defined self.default_preview_template in my ApplicationViewComponentPreview

What did you expect to happen?

The config'd template is used.

What actually happened?

Always uses the constant defined in ViewComponentContrib::Preview::DefaultTemplate

Additional context

I'm actually fixing to push a fix PR in a moment, but your PR template made it sound like I needed to file an issue first.

Environment

Ruby Version: 3.1.1

Framework Version (Rails, whatever): Rails 7.0.2

View Component Contrib Version: 0.1.0