Skip to content
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

Only include url_helpers in Preview class when they are defined #1795

Merged

Commits on Jul 7, 2023

  1. Only include url_helpers in Preview class when they are defined

    Without this, we encounter the following error when running
    `bundle exec rake docs:build`:
    
    ```
    Converting YARD documentation to Markdown files.
    rake aborted!
    NoMethodError: undefined method `routes' for nil:NilClass
    /Users/rmacklin/src/github.com/ViewComponent/view_component/lib/view_component/preview.rb:7:in `<class:Preview>'
    /Users/rmacklin/src/github.com/ViewComponent/view_component/lib/view_component/preview.rb:6:in `<module:ViewComponent>'
    /Users/rmacklin/src/github.com/ViewComponent/view_component/lib/view_component/preview.rb:5:in `<top (required)>'
    /Users/rmacklin/src/github.com/ViewComponent/view_component/lib/view_component/base.rb:11:in `require'
    /Users/rmacklin/src/github.com/ViewComponent/view_component/lib/view_component/base.rb:11:in `<top (required)>'
    /Users/rmacklin/src/github.com/ViewComponent/view_component/Rakefile:81:in `require'
    /Users/rmacklin/src/github.com/ViewComponent/view_component/Rakefile:81:in `block (2 levels) in <top (required)>'
    /Users/rmacklin/.asdf/installs/ruby/2.7.5/bin/bundle:23:in `load'
    /Users/rmacklin/.asdf/installs/ruby/2.7.5/bin/bundle:23:in `<main>'
    Tasks: TOP => docs:build
    (See full trace by running task with --trace)
    ```
    rmacklin committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    40fd68a View commit details
    Browse the repository at this point in the history