ViewComponent / demo

Rails application with ViewComponent
MIT License
157 stars 15 forks source link

Address string interpolation issue, replace render_string with render_component #3

Closed joelhawksley closed 5 years ago

joelhawksley commented 5 years ago

This PR addresses an issue where string interpolation in the template heredoc broke the rendering process.

By using <<-'erb' instead of <<-erb, string interpolation is disabled.

Big thanks to @jhawthorn for coming up with this solution in our pairing session yesterday ❤️

This PR also replaces render_string with render_component, which gives us a cleaner way of testing components.