envato-archive / guide

Document your application with a living component library and styleguide
https://rubygems.org/gems/guide
MIT License
8 stars 3 forks source link

Fix: include custom JS and CSS in HTML scenarios #97

Closed orien closed 3 years ago

orien commented 3 years ago

Context

In #93, we added a fix so scenarios were rendered on Rails 6+. This involved converting the format from string to symbol. Unfortunately, there are a couple places in the codebase that perform comparisons on this value. Namely, the decision to include custom JS and CSS in the scenario.

Change

Correctly inject JS and CSS into HTML scenarios by using symbols in the comparison to detect HTML.