-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View and application helpers not available in a partial rendered from style guide #4
Comments
Robbie, I forked and created StyleGuide::View specifically so that I could inject helper methods for forms. I ended up removing the routes and replacing them with a method missing in StyleGuide::FormHelpers, you could as easily include the routes helpers instead. notably: |
@robb1e @dirkkelly is this a change that should come into the main branch? |
I'd like to see this in the main branch as well. We define a lot of our own helpers, and to be able to use those in the styleguide would be awesome. Furthermore, when viewing the source in the styleguide, it would be nice to see the helper implementation instead of the raw HTML, if possible. That way any developer could see the style and know exactly how to implement it within the context of the project. |
@davidbiehl feel free to add a pull request for the raw helper, I can't imagine that being trivial. |
I created a pull request that I believe solves this issue: #16 |
View helpers like 'user_path' and application helpers defined within our application are not available when the style guide calls a partial.
This is useful for larger components like what a comment block looks like, as it's made of several small components and we want to render these in one place.
Cheers
The text was updated successfully, but these errors were encountered: